Question 1 of 25
Hints left: 3
Q1
gets() function checks overflow run.
Q2
In linux, apart from including math header file, the program is successfully executed by which of the following?
Q3
What will be the output of the following C code? #include <stdio.h> #include <stdlib.h> int main() { FILE *fp = stdout; int n; fprintf(fp, "%d", 45); }
Q4
The parameter control string in the printf () is a C String that contains text to be . . . . . . . .
Q5
What will be the output of the following C code considering user typed jkl? #include <stdio.h> int main() { char n[20]; fgets(n, 19, stdin); ungetc(n[0], stdin); printf("%s\n", n); return 0; }
Q6
fwrite() can be used only with files that are opened in binary mode.
Q7
What will be the output of the following C code? #include <stdio.h> #include <math.h> void main() { int k = fabs(-87); printf("%d\n", k); }
Q8
For the function call time(), what type of parameter is accepted?
Q9
The syntax to print a % using printf statement can be done by . . . . . . . .
Q10
Which among the following is the odd one out?
Q11
Which of the following is the correct declaration for ungetc?
Q12
What will be the output of the following C code? printf(“\n Output: %5d \t %x \t %#x”, 234,234,234);
Q13
What will be the output of the following C code? #include <stdio.h> int main() { char i = '9'; if (isdigit(i)) printf("digit\n"); else printf("not digit\n"); return 0; }
Q14
What will be the output of the following C code? #include <stdio.h> #include <stdlib.h> int main() { srand(9000); printf("%d\n", rand()); return 0; }
Q15
The syntax of the scanf() is scanf("control string ", arg1,arg2,arg3,....,argn); the prototype of control string is
Q16
What is the purpose of sprintf?
Q17
What is meant by 'a' in the following C operation? fp = fopen("Random.txt", "a");
Q18
Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.
Q19
Which of the following is NOT a delimiter for an input in scanf?
Q20
The conversion characters d, i, o, u, and x may be preceded by h in scanf() to indicate?
Q21
Which is true about isaplpha(c), where c is an int that can be represented as an unsigned? char or EOF.isalpha(c) returns
Q22
function fabs defined math.h header file takes the argument of type integer.
Q23
Which is true about isupper(c), where c is an int that can be represented as an unsigned? char or EOF.isupper(c) returns
Q24
Memory allocation using malloc() is done in . . . . . . . .
Q25
What will be the output of the following C code? #include <stdio.h> #include <math.h> int main() { int i = 10; printf("%f\n", log10(i)); return 0; }