Question 1 of 25
Hints left: 3
Q1
Escape sequences are prefixed with . . . . . . . .
Q2
Which of the following statements about stdout and stderr are true?
Q3
What will be the output of the following C code? #include <stdio.h> int main() { short int i; scanf("%*d", &i); printf("%hd", i); return 0; }
Q4
Choose the correct description for control string %-+7.2f.
Q5
fputs() function writes a string to a file that only ends with a newline.
Q6
Only . . . . . . . . character of pushback is guaranteed per file when ungetc is used.
Q7
What will be the output of the following C code? #include <stdio.h> int main() { char *s = "myworld"; int i = 9; printf("%*s", i, s); }
Q8
What does the following segment of C code do? fprintf(fp, "Copying!");
Q9
Which of the following can be used for random number generation?
Q10
void * malloc(size_t n) returns?
Q11
What will be the output of the following C statement? fprintf(stderr, "error: could not open filen");
Q12
What will be the output of the following C code? #include <stdio.h> int main() { char str[11] = "hello"; char *str1 = "world"; strcat(str, str1); printf("%s %d", str, str[10]); }
Q13
Which of the following represents the function for scanf()?
Q14
What will be the output of the following C code? #include <stdio.h> #include <ctype.h> int main() { char c = 't'; printf("is :%c\n", tolower('A')); }
Q15
What is the default return-type of getchar()?
Q16
On freeing a dynamic memory, if the pointer value is not modified, then the pointer points to.
Q17
What error will generate if the read and write parameters are not separated by commas?
Q18
Which mathematical function among the following does NOT require int parameters?
Q19
gets() and puts() operate on . . . . . . . .
Q20
What is the meaning of the following C statement? printf(“%10s”, state);
Q21
Which pre-defined function returns a pointer to the last occurence of a character in a string?
Q22
What will be the output of the following C code? #include <stdio.h> #include <ctype.h> int main() { int i = 0; if (isspace(i)) printf("space\n"); else printf("not space\n"); return 0; }
Q23
Select the correct value of i from given options i=scanf("%d %d", &a, &b);
Q24
ungetc() is used . . . . . . . .
Q25
. . . . . . . . removes the named file, so that a subsequent attempt to open it will fail.