File Input Output MCQs
Practice free File Input Output multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 296 questions — no login required.
Question 145easy
What is the use of getchar()?
Question 146hard
What will be the output of the following C code?
#include <stdio.h>
#include <stdarg.h>
int f(...);
int main()
{
char c = 97;
f(c);
return 0;
}
int f(...)
{
va_list li;
char c = va_arg(li, char);
printf("%c\n", c);
}Question 147easy
Which of the following data-types are promoted when used as a parameter for an ellipsis?
Advertisement
Question 148easy
What is the value of EOF?
Question 149medium
Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?
Question 150easy
log(x) function defined in math.h header file is . . . . . . . .
Advertisement
Question 151easy
ungetc() may be used with . . . . . . . .
Question 152hard
What will be the output of the following C code?
#include <stdio.h>
#include <math.h>
void main()
{
int k = sqrt(-4);
printf("%d\n", k);
}Question 153medium
stdout, stdin and stderr are . . . . . . . .