Question 1 of 25
Hints left: 3
Q1
. . . . . . . . is an optional argument that gives the maximum number of characters to be read.
Q2
Choose the correct difference between getc() and fgetc().
Q3
Which function is used to read and write data in binary mode in C?
Q4
Which among the following mathematical function do not have a "double" return-type?
Q5
Each call of va_arg . . . . . . . .
Q6
Which one of the following is valid for opening a read-only ASCII file?
Q7
What will be the output of the following C code? #include <stdio.h> #include <math.h> int main() { unsigned int i = -1; printf("%f\n", fabs(i)); return 0; }
Q8
setvbuf() and setbuf() function controls buffering for the stream.
Q9
What is the purpose of the 'fileno' function in C?
Q10
What happens if you try to open a file in 'r' mode that doesn't exist in C?
Q11
If the conversion characters of int d, i, o, u and x are preceded by h, it indicates?
Q12
How do you write an integer to a file in C?
Q13
What is the return value of 'putc' if it fails to write a character to a file in C?
Q14
What will be the output of the following C code if following commands are used to run (considering myfile exists)? gcc -otest test.c ./test < myfile #include <stdio.h> int main() { char c = 'd'; putchar(c); }
Q15
What does the 'remove' function in C do?
Q16
What is FILE reserved word?
Q17
Which of the following function compares 2 strings with case-insensitively?
Q18
How do you read a string from a file in C?
Q19
The given statement FILE *fptr;
Q20
The function fprintf is used in the program ...........
Q21
Which function is used to write a character to a file in C?
Q22
Which function is used to create a new directory in C?
Q23
In C, what is the purpose of the 'fflush' function?
Q24
What will be the output of the following C code? #include <stdio.h> struct p { struct p *next; int x; }; int main() { struct p* p1 = malloc(sizeof(struct p)); p1->x = 1; p1->next = malloc(sizeof(struct p)); printf("%d\n", p1->next->x); return 0; }
Q25
What are the two predefined FILE pointers in C?