Error Handling
- What is the purpose of the C function?
int ferror(FILE *fp)
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
They check for output errors
- Which of the following causes an error?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Option A, B and C causes an error.
- Which of the following function can be used to terminate the main function from another function safely?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
exit(expr);
- What happens when we use the following C statement?
fprintf(stderr, "error: could not open file");
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The diagnostic output is directly displayed in the output
- stderr is similar to?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
stdin