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 आएगा।
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