File I/O
- stdout, stdin and stderr are ________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
File pointers
- Which of the following statements about stdout and stderr are true?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Both connected to screen by default
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdout;
int num;
fprintf(fp, "%d ", 105);
fprintf(stderr, "%d ", 99);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
105 99
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
FILE *fp = stdout;
int num;
fprintf(fp, "%d\n ", 200);
fprintf(stderr, "%d", 300);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: E
200
300