File Input Output - Study Mode

[#261] What will be the output of the following C code? #include <stdio.h>
#include <math.h>
void main()
{
int k = sqrt(-4)
printf("%d
", k)
}
Correct Answer

(D) NaN

[#262] 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
")
else
printf("not digit
")
return 0
}
Correct Answer

(B) not digit

[#263] The type va_list in an argument list is used . . . . . . . .
Correct Answer

(A) To declare a variable that will refer to each argument in turn

[#264] Identify X library function for line input and output in the following C code? #include <stdio.h>
int X(char *s, FILE *iop)
{
int c
while (c = *s++)
putc(c, iop)
return ferror(iop) ? EOF : 0
}
Correct Answer

(D) fputs

[#265] What will be the output of the following C code? #include <stdio.h>
int main()
{
char n[20]
fgets(n, 19, stdin)
ungetc(n[0], stdin)
scanf("%s", n)
printf("%s
", n)
return 0
}
Correct Answer

(D) First character of whatever user types first time and whatever user types second time