File Input Output MCQs

296 questionsC-ProgramPage 9 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 73easy
Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.
Question 74easy
function fabs defined math.h header file takes the argument of type integer.
Question 75hard
What will be the output of the following C code considering user typed jkl?
#include <stdio.h>
int main()
{
    char n[20];
    fgets(n, 19, stdin);
    ungetc(n[0], stdin);
    printf("%s\n", n);
    return 0;
}
Advertisement
Question 76easy
Which of the following is NOT a delimiter for an input in scanf?
Question 77medium
Which is true about isupper(c), where c is an int that can be represented as an unsigned?
char or EOF.isupper(c) returns
Question 78hard
What will be the output of the following C code?
#include <stdio.h>
#include <math.h>
void main()
{
    int k = fabs(-87);
    printf("%d\n", k);
}
Advertisement
Question 79easy
gets() function checks overflow run.
Question 80medium
In linux, apart from including math header file, the program is successfully executed by which of the following?
Question 81hard
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char i = '9';
    if (isdigit(i))
        printf("digit\n");
    else
        printf("not digit\n");
        return 0;
}