Welcome Guest | Sign in | Register
File Handling - Discussion Page For Q.10657 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > File Handling > Questions and Answers

Exercise:

Section 1

Q: Write C statements which tests to see if input_file has opened the data file successfully. If not, print an error message and exit the program.
A. Test 1
if( input_file == NULL ) {
printf("Unable to open file.\n");\
exit(1);
}
B. Test 2
if( input_file != NULL ) {
printf("Unable to open file.\n");\
exit(1);
}
C. Test 3
while( input_file = NULL ) {
printf("Unable to open file.\n");\
exit(1);
}
D. Cannot be determined

Answer and Explanation

Answer:Test 1
if( input_file == NULL ) {
printf("Unable to open file.\n");\
exit(1);
}

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.