Top 50+ Solved Managing IO Operations MCQ Questions Answer
Q. If the user enters 1 3.2 s, what value will be returned by the scanf()?scanf("%d %f %c", &s1, &s2, &s3);
a. 1
b. 2
c. 3
d. No return value
Q. If the user enters 1 s 3.2, what value will be returned by the scanf()?scanf("%d %f %c", &a, &b, &c);
a. 1
b. 2
c. 3
d. no return value
Q. 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
Q. 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);
Q. 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
Q. 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
Q. scanf() is a predefined function in______header file.
a. stdlib. h
b. ctype. h
c. stdio. h
d. stdarg. h
Q. 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