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