adplus-dvertising
frame-decoration

Question

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

Posted under C Programming

Answer: (b).Only 2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. 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...