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

View Answer

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]

View Answer

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

View Answer

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

View Answer

_____ is an optional argument that gives the maximum number of characters to be read.

Options

A : modifiers

B : width

C : precision

D : length

View Answer

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

View Answer

A fatal error will be generated if the format string is ended with a white space character.

Options

A : true

B : false

C :

D :

View Answer

Chemical Engineering Basics - Part 1 more Online Exam Quiz

C Multiple Choice Scanf

C Multiple Choice Stringizers

C Multiple Choice String Operations

C Printf

C Recursion

C Signed Qualifier

C String Operations

C Token Concatenation

C Typedef

C Varargs