C Scanf Online Exam Quiz
C Scanf GK Quiz. Question and Answers related to C Scanf. MCQ (Multiple Choice Questions with answers about C Scanf
What is the use of symbol * in the control string as shown [=%[*][width] [modifiers] type=]?
Options
A : * is optional and used when the data should be read from the stream but ignored
B : * is not optional, used to read data from the stream but it is not ignored
C : * is not optional, it is used to read data stream but ignored
D : * is optional and used to read data from stream but it is not ignored
The syntax of the scanf() is scanf(“control string “, arg1,arg2,arg3,….,argn); the prototype of control string is ____________
Options
A : [=%[width][modifiers]type=]
B : [=%[modifiers][width]type=]
C : [=%[width] [modifiers]]
D : [width][modifiers]
What action is carried out by scanf if a user enters any blank spaces, tabs, and newlines?
Options
A : consider as input
B : ignores it
C : produces error
D : nothing can be said
Explain the format string "%5d%s %c"
Options
A : five characters as a decimal integer, then reads the remaining as a string and then scans the first non-whitespace character
B : compile error
C : run-time error
D : read first five characters as a decimal and ignore the rest
_____ is an optional argument that gives the maximum number of characters to be read.
Options
A : modifiers
B : width
C : precision
D : length
What error will generate if the read and write parameters are not separated by commas?
Options
A : run-time error
B : compile error
C : logical error
D : no error
A fatal error will be generated if the format string is ended with a white space character.
Options
A : true
B : false
C :
D :