Test Your Understanding of Reading User Input in C with scanf()
3 Questions
3 Views
3.8 Stars

Test Your Understanding of Reading User Input in C with scanf()

Created by
@RestfulHeliodor

Questions and Answers

Which function is used to read the input from the user in the provided code snippet?

scanf()

What is the purpose of the format specifier %2d in the scanf() function in the provided code snippet?

To indicate that each input should be at most 2 digits long and should be interpreted as an integer.

What will be the output of the provided code snippet if the input '12 34' is provided?

a=12 b=34

More Quizzes Like This

Use Quizgecko on...
Browser
Browser