Report Bug

QusIf a file is open in ‘write’ mode, then Qus यदि फ़ाइल ‘राइट’ मोड में खुली है, तो


A. If it does not exist, an error is returned
B. If it does not exist, it is created
C. If it exists, then data is written at the end
D. If it exists, error is returned


Solution
B. If it does not exist, it is created



Explanation
In C, fopen() is used to open a file in different modes. To open a file in write mode, “w” is specified. When mode “w” is specified, it creates an empty file for output operations. If a file with the same name already exists, its contents are discarded and the file is treated as a new empty file.
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad