Question 1 of 25
Hints left: 3
Q1
Choose the correct difference between getc() and fgetc().
Q2
setvbuf() and setbuf() function controls buffering for the stream.
Q3
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; }
Q4
The function fprintf is used in the program ...........
Q5
What are the two predefined FILE pointers in C?
Q6
What is the purpose of the 'fileno' function in C?
Q7
What is the return value of 'putc' if it fails to write a character to a file in C?
Q8
Which one of the following is valid for opening a read-only ASCII file?
Q9
What happens if you try to open a file in 'r' mode that doesn't exist in C?
Q10
How do you write an integer to a file in C?
Q11
. . . . . . . . is an optional argument that gives the maximum number of characters to be read.
Q12
Which function is used to write a character to a file in C?
Q13
In C, what is the purpose of the 'fflush' function?
Q14
The given statement FILE *fptr;
Q15
How do you read a string from a file in C?
Q16
Which function is used to create a new directory in C?
Q17
If the conversion characters of int d, i, o, u and x are preceded by h, it indicates?
Q18
What does the 'remove' function in C do?
Q19
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); }
Q20
Which among the following mathematical function do not have a "double" return-type?
Q21
Which function is used to read and write data in binary mode in C?
Q22
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; }
Q23
Which of the following function compares 2 strings with case-insensitively?
Q24
Each call of va_arg . . . . . . . .
Q25
What is FILE reserved word?