O Level Exam
Menu mobile
Home
About Us
New Syllabus
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASIS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Old Syllabus
IT Tools and Business Systems
Internet Technology and Web Design
Programming and Problem Solving through ‘C’ language
Introduction to Multimedia
Books
Notification
Contact Us
Infomax
Computer Academy
If a file is open in ‘write’ mode, then
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.