Question 1 of 25
Hints left: 3
Q1
What is the return value of getc()?
Q2
What will be the output of the following C code? #include <stdio.h> int main() { char *str = "hello, world"; char str1[15] = "hello wo 9"; strcpy(str, str1); printf("%s", str1); }
Q3
If the user enters 1 s 3.2, what value will be returned by the scanf()? scanf("%d %f %c", &a, &b, &c);
Q4
Which character of pushback is guaranteed per file?
Q5
Which of the following is the correct syntax for calling function ungetc? Assume int c and FILE *fp
Q6
What is the purpose of va_end?
Q7
What will be the output of the following C code? #include <stdio.h> int main() { int i = 10, j = 2; printf("%d\n", printf("%d %d ", i, j)); }
Q8
Which of the following doesn't require an & for the input in scanf()?
Q9
What will be the value of var for the following C statement? var = strcmp("Hello", "World");
Q10
When a C program is started, O.S environment is responsible for opening file and providing pointer for that file?
Q11
If by mistake you specify more number of arguments, the excess arguments will . . . . . . . .
Q12
Which of the following will return a non-zero value when checked with isspace(c)?
Q13
stderr is similar to?
Q14
What will be the output of the following C code? #include <stdio.h> int main() { char str[10] = "hello"; char *p = strrchr(str, 'l'); printf("%c\n", *(++p)); }
Q15
What error is generated on placing an address operator with a variable in the printf statement?
Q16
Which function will return the current file position for stream?
Q17
For floating point numbers, the precision flag specifies the number of decimal places to be printed. When no precision modifier is specified, printf() prints . . . . . . . .
Q18
What will be the output of the following C code? #include <stdio.h> #include <ctype.h> int main() { char c = 't'; printf("%d\n", isspace(c)); }
Q19
stderr is similar to?
Q20
String operation such as strcat(s, t), strcmp(s, t), strcpy(s, t) and strlen(s) heavily rely upon.
Q21
What will be the output of the following C code? #include <stdio.h> int main() { char str[10] = "hello"; char *str1 = "world"; strncat(str, str1, 9); printf("%s", str); }
Q22
Which is the correct way to generate numbers between minimum and maximum(inclusive)?
Q23
What action is carried out by scanf if a user enters any blank spaces, tabs, and newlines?
Q24
Which of the following cannot be used with ungetc()?
Q25
What does the C statement given below says? scanf("%7s",ch);