STUDY RESOURCE

OOP in C++ Solved MCQs – BICTE 2nd Semester

Resource details

Source
Contributed
Language
English
Last verified
2026-10-17

Facing your BICTE 2nd semester computer science board exams can feel overwhelming when programming concepts like inheritance and polymorphism start getting tested in tricky multiple-choice questions. A solid grasp of fundamental object-oriented principles is what truly separates passing grades from top marks.

This learning resource brings together foundational study guidance and objective question solutions for Object Oriented Programming with C++ under Tribhuvan University. Designed specifically for Bachelor of Information and Communication Technology in Education students, it focuses on how core C++ programming constructs are evaluated in semester assessments.

Whether you are reviewing for internal assessments or preparing for the final TU board examination, practicing solved objective questions allows you to spot tricky syntax traps and solidify your theoretical understanding. Working through these concepts step by step ensures you build confidence across every major topic of the curriculum.

Object-Oriented Programming in C++ Overview

Group “A”: Attempt All Questions

1. In C++, a function within a class is called…

  • a. Member function
  • b. Global function
  • c. Friend function
  • d. Inline function

Correct Answer: a. Member function Explanation: Functions declared inside a class definition are referred to as member functions (or methods) because they are members of that class.

2. A normal C++ operator that acts in special ways on newly defined data types is said to be…

  • a. Function overloading
  • b. Operator overloading
  • c. Type conversion
  • d. Polymorphism

Correct Answer: b. Operator overloading Explanation: Operator overloading allows you to redefine how standard operators (like +, -, *) work with user-defined data types (objects).

3. Which of the following is true for multiple inheritance in C++?

  • a. It cannot be used with virtual functions
  • b. It automatically resolves all conflicts
  • c. C++ does not support multiple inheritance
  • d. It can cause ambiguity without scope resolution

Correct Answer: d. It can cause ambiguity without scope resolution Explanation: This often refers to the “Diamond Problem,” where a class inherits from two classes that share a common ancestor. Without proper handling (like virtual inheritance or scope resolution), the compiler faces ambiguity.

4. Protecting data from access by unauthorized functions is called…

  • a. Data Hiding
  • b. Inheritance
  • c. Abstraction
  • d. Encapsulation

Correct Answer: a. Data Hiding Explanation: While Encapsulation is the wrapping of data and functions together, Data Hiding is the specific concept of restricting access to that data (usually using private or protected keywords) to prevent unauthorized modification.

5. What is scope resolution operator?

  • a. . (dot operator)
  • b. -> (arrow operator)
  • c. :: (double colon)
  • d. ; (semicolon)

Correct Answer: c. :: (double colon) Explanation: The double colon :: is used to define a function outside a class or to access a global variable/namespace when there is a local conflict.

6. What header file must you include with your program to use setw and endl?

  • a. stdio.h
  • b. iomanip
  • c. iostream
  • d. fstream

Correct Answer: b. iomanip Explanation: While endl is available in <iostream>, the setw (set width) manipulator specifically requires the <iomanip> (Input/Output Manipulation) header file.

7. Assuming var1 starts with the value 10, what will the following code fragment print out? cout << var1--; cout << --var1; cout << ++var1;

  • a. 10 8 9
  • b. 10 9 9
  • c. 9 8 8
  • d. 11 10 9

Correct Answer: a. 10 8 9 Explanation:

  1. var1-- (Post-decrement): Prints 10 first, then var1 becomes 9.
  2. --var1 (Pre-decrement): var1 becomes 8, then prints 8.
  3. ++var1 (Pre-increment): var1 becomes 9, then prints 9.

8. If three objects of a class are defined, how many copies of that class data items and member functions are stored in memory?

  • a. 1 copy of data, 1 copy of functions
  • b. 3 copies of data, 3 copies of functions
  • c. 3 copies of data, 1 copy of functions
  • d. 1 copy of data, 3 copies of functions

Correct Answer: c. 3 copies of data, 1 copy of functions Explanation: Each object needs its own unique variables (data) to store its state, but they all share the same code for member functions to save memory.

9. How can a compiler call the appropriate function in overloaded function?

  • a. By function name only
  • b. By return type only
  • c. By argument types and number
  • d. By scope resolution

Correct Answer: c. By argument types and number Explanation: Function overloading is resolved by the “Function Signature,” which consists of the number and types of arguments passed. The return type is ignored in overload resolution.

10. What will be printed by the code below? namespace X { int var = 5; } namespace Y { int var = 10; } using namespace X; int main() { cout << var; return 0; }

  • a. 10
  • b. 5
  • c. Compilation error
  • d. 0

Correct Answer: b. 5 Explanation: The line using namespace X; brings the variables from namespace X into the current scope. Therefore, when cout << var is called, it refers to X::var, which is 5.

What Object-Oriented Programming in C++ Covers

Object-Oriented Programming in C++ introduces students to modern software design patterns by shifting focus from procedure-driven routines to modular, reusable code structures. The syllabus emphasizes class design, data abstraction, encapsulation, and access control specifiers, which together form the bedrock of robust software engineering.

Exam questions frequently probe your understanding of the four major pillars of object-oriented development: encapsulation, data hiding, inheritance, and polymorphism. You will encounter questions testing function overloading, operator overloading, virtual functions, and the scope resolution operator, all of which require a clear mental model of how the compiler manages function calls and memory.

Another significant area of focus involves constructor and destructor mechanics, memory allocation for class instances, and namespaces. Objective and analytical questions frequently evaluate how distinct objects share function code while maintaining separate state variables, as well as how access specifiers prevent unauthorized data modifications.

Mastering these interrelated topics not only prepares you to handle multiple-choice and short-answer questions accurately but also reinforces your programming proficiency for laboratory practicals. Understanding the underlying mechanics helps you predict code outputs and debug syntax issues efficiently during timed exam conditions.

Exam Preparation Tips for BICTE OOP in C++

When preparing for C++ objective questions, pay meticulous attention to operator precedence and increment or decrement behaviors. Pre-increment and post-decrement expressions nested within console output statements are standard exam favorites designed to test your ability to trace step-by-step variable state changes.

Make sure you can clearly differentiate between subtle object-oriented terminology, such as abstraction versus encapsulation, or function overloading versus operator overloading. Writing down concise definitions and comparing their compiler-level mechanisms will prevent confusion when faced with closely worded multiple-choice options.

Practice tracing inheritance hierarchies on paper, especially multiple inheritance and the potential ambiguity issues that arise when classes share a common base. Be comfortable explaining how the scope resolution operator and virtual base classes resolve name conflicts in complex class structures.

Finally, allocate time to write and compile small test programs for tricky features like friend functions, static data members, and standard I/O stream manipulators. Hands-on coding solidifies theoretical knowledge far more effectively than passive reading and ensures you remember header file requirements under exam pressure.

Frequently asked questions

What are the core topics tested in BICTE 2nd semester OOP in C++?

The examination primarily covers class definitions, data hiding, constructors and destructors, inheritance hierarchies, polymorphism, operator overloading, virtual functions, and input-output stream manipulators.

How are objective multiple-choice questions evaluated in TU board exams?

Objective questions in Group A assess fundamental syntax rules, code output tracing, and definitions of core principles, rewarding students who have clear conceptual clarity rather than just rote memorization.

How should I practice code output tracing questions for C++?

Work through short code snippets manually by maintaining a trace table for variable values, noting pre-increment and post-decrement operations carefully before verifying your answers with a C++ compiler.

Where can I find the official syllabus and past papers for BICTE?

You can access complete syllabi, semester notes, model questions, and previous board exam papers for all BICTE semesters directly across the faculty sections of Noted Insights.

About Noted Insights

Noted Insights was founded by Ajay Mahato in 2022 to provide high-quality educational resources, syllabi, and study notes accessible to university students across Nepal. Our mission is to empower learners with the academic tools and practical knowledge they need to excel in technical degree programs like the BICTE.

We believe that quality education has the power to transform lives and should be within reach of every aspiring technologist, regardless of their background or location. Stay consistent with your C++ programming practice, trust your preparation, and approach your upcoming semester exams with confidence.

Scroll to Top