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