Humanities/Arts Exam  >  Humanities/Arts Questions  >  Which of the following options is not correct... Start Learning for Free
Which of the following options is not correct?
  • a)
    If we try to read a text file that does not exist, an error occurs.
  • b)
    If we try to read a text file that does not exist, the file gets created. 
  • c)
    If we try to write on a text file that does not exist, no error occurs.
  • d)
    If we try to write on a text file that does not exist, the file gets created.
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
Which of the following options is not correct?a)If we try to read a te...
If we try to read a text file that does not exist, the file gets created - this is an incorrect statement.
Free Test
Community Answer
Which of the following options is not correct?a)If we try to read a te...
Explanation:

To understand why option 'B' is incorrect, let's analyze each option one by one:

a) If we try to read a text file that does not exist, an error occurs.
When we attempt to read a text file that does not exist, the system will throw an error. This is because the file is not present in the specified location, and thus cannot be read. Hence, option 'a' is correct.

b) If we try to read a text file that does not exist, the file gets created.
This statement is incorrect. When we try to read a file that does not exist, the file does not get created. Instead, an error occurs because the system cannot find the file. Therefore, option 'b' is not correct.

c) If we try to write on a text file that does not exist, no error occurs.
If we attempt to write on a text file that does not exist, the system will create a new file with the specified name. Therefore, no error occurs in this case. Consequently, option 'c' is correct.

d) If we try to write on a text file that does not exist, the file gets created.
Similar to option 'c', when we try to write on a text file that does not exist, the system creates a new file with the given name. Hence, option 'd' is correct.

Conclusion:
After analyzing all the options, it is evident that option 'B' is the incorrect one. When attempting to read a text file that does not exist, an error occurs instead of the file getting created.
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer?
Question Description
Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? for Humanities/Arts 2025 is part of Humanities/Arts preparation. The Question and answers have been prepared according to the Humanities/Arts exam syllabus. Information about Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Humanities/Arts 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer?.
Solutions for Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Humanities/Arts. Download more important topics, notes, lectures and mock test series for Humanities/Arts Exam by signing up for free.
Here you can find the meaning of Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following options is not correct?a)If we try to read a text file that does not exist, an error occurs.b)If we try to read a text file that does not exist, the file gets created.c)If we try to write on a text file that does not exist, no error occurs.d)If we try to write on a text file that does not exist, the file gets created.Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Humanities/Arts tests.
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev