Tag: Ireland
-

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 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 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
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.…
-

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…
-

C++ Programming Questions and Answers – Catching Exceptions
C++ programming interview questions and answers focuses on “Catching Exceptions”. One shall practice these interview questions to improve their C++ programming skills needed for various interviews (campus interviews, walkin 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…
-

C++ Programming Questions and Answers – Error Handling
C++ programming questions and answers focuses on “Error Handling”. 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. fresher, engineering graduate or…
-

Python Questions and Answers – Recursion
Python Multiple Choice Questions & Answers (MCQs) focuses on “Recursion”. Q 1. Which is the most appropriate definition for recursion?A. A function that calls itselfB. A function execution instance that calls another execution instance of the same functionC. A class method that calls another class methodD. An in-built method that is automatically called Show Answer…
-
Python Multiple Choice Questions – Argument Parsing
Python Multiple Choice Questions & Answers (MCQs) focuses on “Argument Parsing”. Q 1. What is the type of each element in sys.argv?A. setB. listC. tupleD. string Show Answer Answer:-D. string Explanation It is a list of strings. Q 2. What is the length of sys.argv?A. number of argumentsB. number of arguments + 1C. number of…
-

Python Questions and Answers – Function – 4
Python Multiple Choice Questions & Answers (MCQs) focuses on “Function – 4”. Q 1. What is a variable defined outside a function referred to as?A. A static variableB. A global variableC. A local variableD. An automatic variable Show Answer Answer:-B. A global variable Explanation The value of a variable defined outside all function definitions is…
