Question 71Asked in Bihar STET 2025 Paper II Computer Science, 3 Nov 2025, Shift 2 (2:00 PM)

What is the main advantage of using exception handling in programming?प्रोग्रामिंग में अपवाद हैंडलिंग का उपयोग करने का मुख्य लाभ क्या है?

प्रोग्रामिंग में अपवाद हैंडलिंग का उपयोग करने का मुख्य लाभ क्या है?
  1. AIt prevents code from runningयह कोड को चलने से रोकता है
  2. BIt improves code readabilityयह कोड पठनीयता में सुधार करता है
  3. CIt handles unexpected errors and allows graceful program terminationयह अप्रत्याशित त्रुटियों को संभालता है और सुंदर कार्यक्रम समाप्ति की अनुमति देता है
  4. DIt eliminates the need for classes and objectsयह कक्षाओं और वस्तुओं की आवश्यकता को समाप्त करता है
Show answerHide answer

Correct answer: (C) It handles unexpected errors and allows graceful program terminationयह अप्रत्याशित त्रुटियों को संभालता है और सुंदर कार्यक्रम समाप्ति की अनुमति देता है

Explanation

Exception handling catches runtime errors so that the program can recover or end gracefully instead of crashing, using try/except (or try/catch) blocks.Exception handling रनटाइम त्रुटियाँ पकड़ती है ताकि प्रोग्राम क्रैश होने के बजाय उबर सके या शालीनता से समाप्त हो, try/except (या try/catch) ब्लॉक से।

From Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2:00 PM)

This is question 71 of Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.