Report Bug

QusWhat happens when this code is executed? Qusनिम्न code execute करने पर क्या होगा?


A. Data is written successfully
B. File content is overwritten
C. Raises an exception
D. Nothing happens


Solution
C. Raises an exception



Explanation
A file opened in read-only (r) mode cannot be written to.

r mode में खुली file केवल पढ़ी जा सकती है; उसमें write करने पर exception आएगा।
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad