Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? #include <stdio.h> void main() { int n; scanf("%d", n); printf("%d", n); }
Q2
What will be the output of the following C code? #include <stdio.h> #include <stdarg.h> int f(...); int main() { char c = 97; f(c); return 0; } int f(...) { va_list li; char c = va_arg(li, char); printf("%c\n", c); }
Q3
What is the value of EOF?
Q4
Which of the following causes an error?
Q5
ungetc() may be used with . . . . . . . .
Q6
The standard header . . . . . . . . is used for variable list arguments (...) in C.
Q7
gets() does the following when it reads from stdin.
Q8
What will be the output of the following C code? #include <stdio.h> #include <math.h> void main() { int k = sqrt(-4); printf("%d\n", k); }
Q9
Which header file includes a function for variable number of arguments?
Q10
What will be the output of the following C code (when 4 and 5 are entered)? #include <stdio.h> void main() { int m, n; printf("enter a number"); scanf("%d", &n); scanf("%d", &m); printf("%d\t%d\n", n, m); }
Q11
What will cos(x) return?
Q12
What is the function of the mode ' w+'?
Q13
stdout, stdin and stderr are . . . . . . . .
Q14
What will be the output of the following C code? #include <stdio.h> int main() { int i = 10, j = 3; printf("%d %d %d", i, j); }
Q15
What will be the output of the following C code? #include <stdio.h> int main() { short int i; scanf("%h*d", &i); printf("%hd", i); return 0; }
Q16
Which one of the following is correct syntax for opening a file.
Q17
Which of these is a correct way to generate numbers between 0 to 1(inclusive) randomly?
Q18
For binary files, a . . . . . . . . must be appended to the mode string.
Q19
Which of the following data-types are promoted when used as a parameter for an ellipsis?
Q20
What will be the output of the following C code? #include <stdio.h> #include <ctype.h> int main() { char i = 9; if (isdigit(i)) printf("digit\n"); else printf("not digit\n"); return 0; }
Q21
fputs() adds newline character.
Q22
log(x) function defined in math.h header file is . . . . . . . .
Q23
The type va_list in an argument list is used . . . . . . . .
Q24
Choose the right statement for fscanf() and scanf()
Q25
What is the qualifying input for the type specifier G?