14/01/2026
🔹 Unit 1: Introduction to Data Structure (More MCQs)
Which data structure stores elements in contiguous memory locations?
a) Linked List
b) Stack
c) Array
d) Graph
✅ Answer: c
Which data structure is best for implementing recursion?
a) Queue
b) Stack
c) Array
d) Tree
✅ Answer: b
In which data structure insertion and deletion are done from one end only?
a) Queue
b) Stack
c) Linked List
d) Graph
✅ Answer: b
Which data structure is used to represent hierarchical data?
a) Array
b) Stack
c) Tree
d) Queue
✅ Answer: c
Which operation checks whether a data element exists or not?
a) Sorting
b) Traversing
c) Searching
d) Insertion
✅ Answer: c
Which data structure is dynamic in size?
a) Array
b) Linked List
c) Stack (array based)
d) Static array
✅ Answer: b
Which is NOT an example of linear data structure?
a) Queue
b) Stack
c) Tree
d) Array
✅ Answer: c
Which data structure is used in breadth-first search?
a) Stack
b) Queue
c) Tree
d) Array
✅ Answer: b
Which operation combines two similar data structures?
a) Traversal
b) Merging
c) Sorting
d) Searching
✅ Answer: b
Which data structure is most suitable for implementing undo/redo operations?
a) Queue
b) Stack
c) Linked List
d) Graph
✅ Answer: b
🔹 Unit 2: OOP Concepts using C++ (More MCQs)
Which feature of OOP increases program security?
a) Polymorphism
b) Inheritance
c) Encapsulation
d) Abstraction
✅ Answer: c
Which OOP feature allows one interface with multiple implementations?
a) Inheritance
b) Abstraction
c) Polymorphism
d) Encapsulation
✅ Answer: c
Which concept binds data and functions together?
a) Abstraction
b) Polymorphism
c) Inheritance
d) Encapsulation
✅ Answer: d
Which programming approach focuses on real-world entities?
a) Structured
b) Modular
c) Object-Oriented
d) Procedural
✅ Answer: c
Which of the following supports both procedural and OOP concepts?
a) Java
b) Python
c) C
d) C++
✅ Answer: d
Which feature of OOP reduces code duplication?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
✅ Answer: b
🔹 Unit 2: C++ Basics, Tokens & I/O (More MCQs)
Which of the following is a valid identifier in C++?
a) 2sum
b) total_marks
c) float
d) int
✅ Answer: b
Which operator is used for scope resolution?
a) :
b) ::
c) .
d) ->
✅ Answer: b
Which header file is required for input-output operations?
a) stdio.h
b) conio.h
c) iostream
d) math.h
✅ Answer: c
Which keyword is used to declare a constant variable?
a) constant
b) define
c) const
d) static
✅ Answer: c
Which data type stores only true or false values?
a) char
b) int
c) bool
d) float
✅ Answer: c
Which symbol is used to insert a value using cin?
a) >
c) =
d) ::
✅ Answer: b
🔹 Unit 2: Control Statements (More MCQs)
Which statement is used to exit a loop immediately?
a) continue
b) stop
c) break
d) return
✅ Answer: c
Which control statement is used for multiple condition checking?
a) if
b) if-else
c) switch
d) for
✅ Answer: c
Which loop is best when the number of iterations is known?
a) while
b) do-while
c) for
d) switch
✅ Answer: c
Which statement skips the current iteration of a loop?
a) break
b) skip
c) continue
d) exit
✅ Answer: c
🔹 Unit 3: Class and Object (More MCQs)
Which keyword is used to define a class in C++?
a) struct
b) define
c) class
d) object
✅ Answer: c
Data members of a class are also called:
a) Functions
b) Methods
c) Variables
d) Objects
✅ Answer: c
Which access specifier allows access only within the class?
a) public
b) protected
c) private
d) default
✅ Answer: c
How many constructors can a class have?
a) One
b) Two
c) Three
d) Multiple
✅ Answer: d
Constructor has the same name as:
a) Object
b) Function
c) Class
d) Variable
✅ Answer: c
🔹 Unit 4: Abstraction & Encapsulation (More MCQs)
Which keyword helps to achieve abstraction in C++?
a) class
b) private
c) virtual
d) protected
✅ Answer: c
Which OOP feature improves maintainability of code?
a) Polymorphism
b) Abstraction
c) Encapsulation
d) Inheritance
✅ Answer: b
Which access specifier is used to hide data?
a) public
b) protected
c) private
d) default
✅ Answer: c
Abstraction mainly focuses on:
a) Implementation
b) Syntax
c) Essential features
d) Memory
✅ Answer: c
Encapsulation is also known as:
a) Data hiding
b) Code reuse
c) Data binding
d) Function hiding
✅ Answer: a
28/06/2025