File Input Output MCQs

296 questionsC-ProgramPage 21 of 33

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 181hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *str = "hello, world";
    char str1[15] = "hello wo 9";
    strcpy(str, str1);
    printf("%s", str1);
}
Question 182easy
What is the return value of getc()?
Question 183medium
What does the C statement given below says?
scanf("%7s",ch);
Advertisement
Question 184medium
What action is carried out by scanf if a user enters any blank spaces, tabs, and newlines?
Question 185easy
Which of the following will return a non-zero value when checked with isspace(c)?
Question 186medium
Which is the correct way to generate numbers between minimum and maximum(inclusive)?
Advertisement
Question 187hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char str[10] = "hello";
    char *str1 = "world";
    strncat(str, str1, 9);
    printf("%s", str);
}
Question 188medium
What will be the value of var for the following C statement?
var = strcmp("Hello", "World");
Question 189medium
If by mistake you specify more number of arguments, the excess arguments will . . . . . . . .
File Input Output MCQs with Answers & Solutions — C-Program | GrabStudy