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 280hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
short int i;
scanf("%*hd", &i);
printf("%hd", i);
return 0;
}Question 281medium
Within main, return expr statement is equivalent to . . . . . . . .
Question 282medium
ungetc() can be used only with getc().
Advertisement
Question 283easy
calloc() returns storage that is initialized to.
Question 284medium
puts() does the following when it writes to stdout.
Question 285hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
char buf[12];
stderr = stdin;
fscanf(stderr, "%s", buf);
printf("%s\n", buf);
}Advertisement
Question 286medium
Which of the following statement is true?
Question 287medium
Control string specifies the type and format of the data that has to be obtained from the keyboard.
Question 288hard
What form the data must be entered for the given C code?
scanf(“%d / %d”, &n1,&n2);