![Mcqmate logo](https://mcqmate.com/images/logos/logo-black.png)
![Mcqmate logo](https://mcqmate.com/images/logos/logo-white.png)
McqMate
Chapters
101. |
What error will be generated on using incorrect specifier for the datatype being read? |
A. | compile error |
B. | run-time error |
C. | logical error |
D. | no error |
Answer» B. run-time error |
102. |
What is the prototype of scanf function? |
A. | scanf("controlstring",arg1,arg2,arg3,….,argn); |
B. | scanf("control string", variable list); |
C. | scanf(" varible list,", control string); |
D. | scanf("arg1,arg2,arg3,….,argn", control string); |
Answer» A. scanf("controlstring",arg1,arg2,arg3,….,argn); |
103. |
What is the meaning of the following C statement? scanf("%[^\n]s", ch); |
A. | read all character except new line |
B. | read all characters |
C. | read only new line character |
D. | syntax error |
Answer» A. read all character except new line |
104. |
What is the qualifying input for the type specifier G? |
A. | floating point numbers |
B. | floating point numbers in exponential format |
C. | floating point numbers in the shorter of exponential format |
D. | not a type specifier |
Answer» C. floating point numbers in the shorter of exponential format |
105. |
scanf() is a predefined function in______header file. |
A. | stdlib. h |
B. | ctype. h |
C. | stdio. h |
D. | stdarg. h |
Answer» C. stdio. h |
106. |
What does the C statement given below says? scanf("%7s",ch); |
A. | read string with minimum 7 characters. |
B. | read string with maximum 7 characters |
C. | read string exactly to 7 characters |
D. | read string with any number of characters |
Answer» B. read string with maximum 7 characters |
Done Reading?