Category: Programming

  • Python Questions and Answers – Exception Handling – 3

    Python Questions and Answers – Exception Handling – 3

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Exception Handling – 3”. Q 1. What happens if the file is not found in the following Python code?a=Falsewhile not a:try:f_n = input(“Enter file name”)i_f = open(f_n, ‘r’)except:print(“Input file not found”)A. Name errorB. Assertion errorC. Input output errorD. No error Show Answer Answer:-D. No error Explanation…

  • Python Questions and Answers – Exception Handling – 2

    Python Questions and Answers – Exception Handling – 2

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Exception Handling – 2”. Q 1. The following Python code will result in an error if the input value is entered as -5. assert False, ‘Spanish’A. TrueB. False Show Answer Answer:-A. True Explanation The code shown above results in an assertion error. The output of the…

  • C++ Programming Questions and Answers – Exception Handling – 2

    C++ Programming Questions and Answers – Exception Handling – 2

    C++ Programming Multiple Choice Questions & Answers (MCQs) focuses on “Exception Handling – 2”. Q 1. Where should we place catch block of the derived class in a try-catch block?A. Before the catch block of Base classB. After the catch block of Base classC. Anywhere in the sequence of catch blocksD. After all the catch…

  • Python Decorators MCQ Quiz Best Question 2026

    Python Decorators MCQ Quiz Best Question 2026

    Part 1: Basics and Syntax Q 1. What is a decorator in Python? A. A way to delete functions B. A function that takes another function and extends its behavior without explicitly modifying it C. A tool used to compile Python code into C++ D. A class method used for garbage collection Show Answer Answer:-B.…

  • C++ Programming Questions and Answers – Exceptions That Are Not Errors

    C++ Programming Questions and Answers – Exceptions That Are Not Errors

    C++ MCQs (multiple choice questions) focuses on “Exceptions That Are Not Errors”. One shall practice these MCQs to improve their C++ programming skills needed for various interviews (campus interviews, walk in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They…

  • Python Questions and Answers – Encapsulation

    Python Questions and Answers – Encapsulation

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Encapsulation”. Q 1. Which of these is not a fundamental features of OOP?A. EncapsulationB. InstantiationC. InheritanceD. Polymorphism Show Answer Answer:-B. Instantiation Explanation Instantiation simply refers to creation of an instance of class. It is not a fundamental feature of OOP. Q 2. Which of the following…

  • Python Questions and Answers – Polymorphism

    Python Questions and Answers – Polymorphism

    Python Multiple Choice Questions & Answers (MCQs) focuses on “Polymorphism”. Q 1. Which of the following best describes polymorphism?A. Ability of a class to derive members of another class as a part of its own definitionB. Means of bundling instance variables and methods in order to restrict access to certain class membersC. Focuses on variables…

  • C++ Programming Questions and Answers – Uncaught Exceptions

    C++ Programming Questions and Answers – Uncaught Exceptions

    C++ programming questions and answers focuses on “Uncaught Exceptions”. One shall practice these questions to improve their C++ programming skills needed for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They can be a beginner,…

  • C++ Programming Questions and Answers – Exception Specifications

    C++ Programming Questions and Answers – Exception Specifications

    C++ interview questions focuses on “Exception Specifications”. One shall practice these advanced C++ questions to improve their C++ programming skills needed for various interviews (campus interviews, walk in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They can be a…

  • C++ Programming Questions and Answers – Resource Management

    C++ Programming Questions and Answers – Resource Management

    C++ interview questions focuses on “Resource Management”. One shall practice these advanced C++ questions to improve their C++ programming skills needed for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C++ programming language. They can be a beginner,…