Top 50+ Solved Managing IO Operations MCQ Questions Answer
Q. The type va_list in an argument list is used ________
a. To declare a variable that will refer to each argument in turn;
b. For cleanup
c. To create a list
d. There is no such type
Q. In a variable length argument function, the declaration “…” can _______
a. Appear anywhere in the function declaration
b. Only appear at the end of an argument list
c. Nothing
d. None of the mentioned
Q. Each call of va_arg _______
a. Returns one argument
b. Steps va_list variable to the next
c. Returns one argument & Steps va_list variable to the next
d. None of the mentioned
Q. The standard header _______ is used for variable list arguments (…) in C.
a. <stdio.h >
b. <stdlib.h>
c. <math.h>
d. <stdarg.h>
Q. What is the purpose of va_end?
a. Cleanup is necessary
b. Must be called before the program returns
c. Cleanup is necessary & Must be called before the program returns
d. None of the mentioned
Q. Which of the following is NOT a delimiter for an input in scanf?
a. Enter
b. Space
c. Tab
d. None of the mentioned
Q. If the conversion characters of int d, i, o, u and x are preceded by h, it indicates?
a. A pointer to int
b. A pointer to short
c. A pointer to long
d. A pointer to char
Q. Which of the following doesn’t require an & for the input in scanf()?
a. char name[10];
b. int name[10];
c. float name[10];
d. all of the mentioned
Q. Which of the following is an invalid method for input?
a. scanf(“%d%d%d”,&a, &b, &c);
b. scanf(“%d %d %d”, &a, &b, &c);
c. scanf(“Three values are %d %d %d”,&a,&b,&c);
d. none of the mentioned
Q. Which of the following represents the function for scanf()?
a. void scanf(char *format, …)
b. int scanf(char *format, …)
c. char scanf(int format, …)
d. char *scanf(char *format, …)
Q. What does scanf() function return?
a. Number of successfully matched and assigned input items
b. Nothing
c. Number of characters properly printed
d. Error
Q. The conversion characters d, i, o, u, and x may be preceded by h in scanf() to indicate?
a. A pointer to short
b. A pointer to long
c. Nothing
d. Error
Q. The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the controlstring?
a. %[flags][.precision][width][length]specifier
b. %[flags][length][width][.precision]specifier
c. %[flags][width][.precision][length]specifier
d. %[flags][.precision][length][width]specifier
Q. The parameter control string in the printf () is a C String that contains text to be __________
a. taken from a standard output device
b. written on to the standard output device
c. received from the standard output device
d. nothing can be said
Q. Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.
a. specifier
b. flags
c. precision
d. decimal