Question 1 of 25
Hints left: 3
Q1
What is the return value of putchar()?
Q2
In C language, FILE is of which data type?
Q3
What will be the output of the following code? char t=’N’; printf(“\n %c \n %3c \n %5c”,t,t,t);
Q4
What will be the output of the following C statement? int sscanf(char *string, char *format, arg1, arg2, ...)
Q5
What does scanf() function return?
Q6
The syntax of fgets is char *fgets(char *line, int maxline, FILE *fp). Which is true for fgets?
Q7
Which of the following is an invalid method for input?
Q8
In function free(p), p is a . . . . . . . .
Q9
Which of the following function can be used to terminate the main function from another function safely?
Q10
Which types of input are accepted in toupper(c)?
Q11
For a typical program, the input is taken using . . . . . . . .
Q12
Which functions is declared in ?
Q13
The maximum number of characters to be printed is specified by . . . . . . . .
Q14
What error will be generated on using incorrect specifier for the datatype being read?
Q15
What does the following C code snippet mean? char *gets(char *s)
Q16
What is the output of the following C code if there is no error in stream fp? #include <stdio.h> int main() { FILE *fp; fp = fopen("newfile", "w"); printf("%d\n", ferror(fp)); return 0; }
Q17
Which is the best way to generate numbers between 0 to 99?
Q18
What does the following C code snippet mean? int ungetc(int c, FILE *stream)
Q19
Which among the following is correct function call for rand() and random()?
Q20
What is the use of symbol * in the control string as shown [=%[*][width] [modifiers] type=]?
Q21
What will be the output of the following C code? #include <stdio.h> int main(int argc, char** argv) { char *s = "myworld"; int i = 3; printf("%10.*s", i, s); }
Q22
what is the return value of fputs()?
Q23
What will be the output of the following C code? #include <stdio.h> int f(char chr, ...); int main() { char c = 97; f(c); return 0; } int f(char c, ...) { printf("%c\n", c); }
Q24
What will be the output of the following C code? #include <stdio.h> int main() { FILE *fp = stdout; stderr = fp; fprintf(stderr, "%s", "hello"); }
Q25
What will be the output of the following C code? #include <stdio.h> #include <stdarg.h> int f(char c, ...); int main() { char c = 97, d = 98; f(c, d); return 0; } int f(char c, ...) { va_list li; va_start(li, c); char d = va_arg(li, int); printf("%c\n", d); va_end(li); }