Which of the following causes an error?
1. Trying to read a file that doesn’t exist
2.Inability to write data in a file
3.Failure to allocate memory with the help of malloc
4.All of the mentioned
stderr is similar to?
1.stdin
2. stdout
3.both stdout and stdin
4.none of the mentioned
stderr is similar to?
1.stdin
2. stdout
3.Both stdout and stdin
4.None of the mentioned
stdout, stdin and stderr are ___
1.Structure
2.File pointers
3.File descriptors
4.Streams
What is the purpose of the C function? int ferror(FILE *fp)
1. They check for input errors
2.They check for output errors
3.They check for all types of errors
4.They check for error in accessing the file
What is the purpose of the C function? int ferror(FILE *fp)
1.They check for input errors
2.They check for output errors
3. They check for all types of errors
4.They check for error in accessing the file
What will be the output of the following C statement? fprintf(stderr, "error: could not open filen");
1.The diagnostic output is directly displayed in the output
2.The diagnostic output is pipelined to the output file
3.The line which caused error is compiled again
4. The program is immediately aborted
Which of the following causes an error?
1.Trying to read a file that doesn’t exist
2.Inability to write data in a file
3. Failure to allocate memory with the help of malloc
4.All of the mentioned
Which of the following function can be used to terminate the main function from another function safely?
1.return(expr);
2.exit(expr);
3.abort();
4.both exit(expr); and abort();
Which of the following function can be used to terminate the main() function from another function safely?
1.return(expr);
2.exit(expr);
3.abort();
4. both exit(expr); and abort();
Which of the following statements about stdout and stderr are true?
1.Same
2.Both connected to screen always
3.Both connected to screen by default
4.stdout is line buffered but stderr is unbuffered
Within main, return expr statement is equivalent to _______
1.abort(expr)
2.exit(expr)
3.ferror(expr)
4.none of the mentioned