25. | What is the output of this C code? #include
int main()
{
FILE *fp = stdin;
int n;
fprintf(fp, "%d", 45);
}
|
|||||||
|
26. | What will be the output of the program ? #include
int main()
{
FILE *ptr;
char i;
ptr = fopen("myfile.c", "r");
while((i=fgetc(ptr))!=NULL)
printf("%c", i);
return 0;
}
|
|||||||
|
27. | What will be the output of the program ? #include
int main(){
++EOF;
printf("%d",EOF);
return 0;
}
|
|||||||
|
28. | What is the output of this C code? #include
int main(){
char c;
FILE *fp;
fp=fopen("d:\\rootro~1\\shalu.txt","r");
while((c=fgetc(fp))!=EOF)
printf("%c",c);
fclose(fp);
return 0;
}
|
|||||||
|
29. | What is the output of this code considering user typed jkl? #include
int main()
{
char n[20];
fgets(n, 19, stdin);
ungetc(n[0], stdin);
printf("%s\n", n);
return 0;
}
|
|||||||
|
30. | What is the output of this C code? #include
int main()
{
FILE *fp = stdout;
int n;
fprintf(fp, "%d ", 55);
fprintf(stderr, "%d ", 65);
return 0;
}
|
|||||||
|
« previous
1
2
3
4
5
6
7
next »