Question 10
Back to Exercise
In scanf("%*d %d", &x);, what does the * do?
- A Takes the field width from an argument, as in printf
- B Reads an integer and discards it, so x gets the second integer Correct
- C Reads into a pointer
- D Makes the conversion optional
Correct Answer: Option B
In scanf, * suppresses assignment and the item is not counted in the return value. scanf has no way to take a width from an argument.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!