Skip to main content

Object Oriented Programming Using C Plus Plus — Part 2 MCQs with Explanations

Practice high-yield Computer Science & IT MCQs on Object Oriented Programming Using C Plus Plus — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ PPSC ★ FPSC

Redirection redirects

Question 2 of 40
★ PPSC ★ FPSC

You mark the beginning of a function's block of code with the _____

Question 3 of 40
★ PPSC ★ FPSC

Sending a copy of data to a program module is called _______

Question 4 of 40
★ PPSC ★ FPSC

Of the three ways to pass arguments to functions, only passing by _____ and passing by _____ allow the function to modify the argument in the calling program

Question 5 of 40
★ PPSC ★ FPSC

To use either an input or output file, the program must include the _____ header file

Question 6 of 40
★ PPSC ★ FPSC

A widget is to the blueprint for a widget as an object is to

Question 7 of 40
★ PPSC ★ FPSC

C++ allows you to define the same functions more than once in the same program _____

Question 8 of 40
★ PPSC ★ FPSC

Which of the following assigns the number 5 to the area variable?

Question 9 of 40
★ PPSC ★ FPSC

A base class may also be called a

Question 10 of 40
★ PPSC ★ FPSC

The _____ mode tells C++ to open a file for input

Question 11 of 40
★ PPSC ★ FPSC

Using the wardrobe structure within the ShopList structure is an example of a good programming principle, known as _____

Question 12 of 40
★ PPSC ★ FPSC

When you omit parameters from a function call, values can be provided by

Question 13 of 40
★ PPSC ★ FPSC

The first element in a string is

Question 14 of 40
★ PPSC ★ FPSC

Variables declared outside a block are called _____

Question 15 of 40
★ PPSC ★ FPSC

The compiler converts your C++ instructions into _____

Question 16 of 40
★ PPSC ★ FPSC

A fundamental type such as int or double is a _____

Question 17 of 40
★ PPSC ★ FPSC

The return type you code for all constructors is _____

Question 18 of 40
★ PPSC ★ FPSC

When an object-oriented program detects an error within a function, the function _________

Question 19 of 40
★ PPSC ★ FPSC

Using a statement at the wrong time or with an inappropriate object creates a

Question 20 of 40
★ PPSC ★ FPSC

When you create a derived class and instantiate an object _____

Question 21 of 40
★ PPSC ★ FPSC

A constructor always has

Question 22 of 40
★ PPSC ★ FPSC

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

Question 23 of 40
★ PPSC ★ FPSC

A function in a derived class that has the same name as a function in the parent class

Question 24 of 40
★ PPSC ★ FPSC

In which statements, does a 'continue' statements cause the control to go directly to the test condition and then continue the looping process?

Question 25 of 40
★ PPSC ★ FPSC

In a class specifier, data or functions designated private are accessible

Question 26 of 40
★ PPSC ★ FPSC

When a function includes a throw statement for errors, the call to the potentially offending function should be placed within a _____ block

Question 27 of 40
★ PPSC ★ FPSC

The scope resolution operator is

Question 28 of 40
★ PPSC ★ FPSC

"C++" is a _____ constant

Question 29 of 40
★ PPSC ★ FPSC

In a C++ program, which of the following can be thrown?

Question 30 of 40
★ PPSC ★ FPSC

The items listed in the function header are called _____

Question 31 of 40
★ PPSC ★ FPSC

A translator that notes whether you have used a language correctly may be called a _____

Question 32 of 40
★ PPSC ★ FPSC

The feature in object-oriented programming that allows the same operation to be carried out differently, depending on the object, is_____

Question 33 of 40
★ PPSC ★ FPSC

When an argument is passed by reference,

Question 34 of 40
★ PPSC ★ FPSC

The process of extracting the relevant attributes of an object is known as

Question 35 of 40
★ PPSC ★ FPSC

Which of the following statements uses the computer's clock to initialize the random number generator?

Question 36 of 40
★ PPSC ★ FPSC

You must provide a constructor for a derived class

Question 37 of 40
★ PPSC ★ FPSC

If you want to override constructor default values for an object you are instantiating, you must also override

Question 38 of 40
★ PPSC ★ FPSC

To use one of the C++ built-in mathematical functions, you must include the _____ header file in your program

Question 39 of 40
★ PPSC ★ FPSC

Errors in a program are called

Question 40 of 40
★ PPSC ★ FPSC

If you declare two objects as Customer firstCust, secondCust; which of the following must be true?

✓ Link copied to clipboard
Continue Your Practice

Advanced Mapreduce Concepts — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Computer Science & IT

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Computer Science & IT

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →