C Programming :: File Input/Output - Discussion
Home > C Programming > File Input/Output > MCQs Questions Discussion
7 / 12
Choose the correct option.
The expression ((fpt = fopen ("Samples", "w")) == NULL) would be true if
Athe file sample does not exist while fopen is being executed
Bthe file "sample" could not be created for writing
Cfpt is not deeclared as a FILE pointer
Dthe file "sample" is read only
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
TRICK
This is because here 'w' means it truncate file to zero length or create text file for writing. The stream is positioned at the beginning of the file. But, it is null hence, the file "sample" could not be created for writing.
Read Full Answer
Report Error
Please Login First Click Here