115
82.2k
Chapter:

50+ Managing IO Operations Solved MCQs

in C Language

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Bachelor of Business Administration in Computer Applications (BBA [CA]) .

Chapters

Chapter: Managing IO Operations
51.

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
Answer» C. 3
52.

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
Answer» A. 1
53.

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
54.

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);
55.

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
56.

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
57.

scanf() is a predefined function in______header file.

A. stdlib. h
B. ctype. h
C. stdio. h
D. stdarg. h
Answer» C. stdio. h
58.

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 Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.