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.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials 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 Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz