Skip to content
Related Articles

Related Articles

Improve Article
C | File Handling | Question 4
  • Last Updated : 27 Mar, 2014

In fopen(), the open mode “wx” is sometimes preferred “w” because.

1) Use of wx is more efficient.
2) If w is used, old contents of file are erased and a new empty file is created. When wx is used, fopen() returns NULL if file already exists.
(A) Only 1
(B) Only 2
(C) Both 1 and 2
(D) Neither 1 nor 2

Answer: (B)

Explanation: See

Quiz of this Question

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :