Skip to main content

OOP MCQ — 7 Practice Questions with Answers

OOP is a Data Processing & Programming (Basic CI) topic in the RAS/RPSC syllabus. This page gathers exam-style OOP multiple-choice questions with correct answers and explanations, so aspirants can test recall and revise frequently examined concepts.

Practice 7 OOP multiple-choice questions with detailed answers and explanations. Ideal for RAS/RPSC exam preparation.

7 Questions Data Processing & Programming (Basic CI)

Reviewed by: Aspirant Academy Editorial Team

Practice Questions

Q1. If three threads are trying to share a single object at the same time which condition will arise in the scenario?

A Time-lapse
B Critical situation
C Race condition Correct
D Recursion

Explanation

When different threads operate on the same shared data and their steps interleave, the result can depend on timing. This timing-dependent concurrency problem is called a race condition. Therefore the scenario matches option C.

Q2. ‘ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (C++) -

A *(ptrdata ++) Correct
B (*ptrdata)++
C *(ptrdata) ++
D Depends on compiler

Explanation

In C++, postfix increment has higher precedence than unary indirection. Therefore `*ptrdata++` is parsed as `*(ptrdata++)`, not as `(*ptrdata)++`. Hence option A is correct.

Q3. Which of the following statements is/are true regarding Java? A. Constants that cannot be changed are declared using the `static` keyword. B. A class can inherit only one class but can implement multiple interfaces.

A A is true
B B is true Correct
C Both (A) and (B) are true
D Neither (A) nor (B) is true

Explanation

Statement A is false because Java uses `final` for a variable that may be assigned only once; `static` only makes a member belong to the class. Statement B matches Java's inheritance rule: a class extends only one class but may implement multiple interfaces. Hence option B is correct.

Q4. Which statement is/are true about Exception handling? i. There can be try block without catch block but vice versa is not possible. ii. There is no limit on the number of catch block corresponding to a try block. iii. The object must be created of a specific class of which the error has occurred otherwise runtime error will occur. iv. To execute a code with each and every run of program, the code is written in finally block.

A i and ii, iv Correct
B Only ii
C Only iii
D ii and iv Only

Explanation

In exception handling, a try block can be used without a catch block if it is followed by finally, but a catch block cannot stand alone. A single try block can have multiple catch blocks, and finally is used for code intended to run after the try-catch flow in normal execution. Statement iii is false because exceptions are handled through compatible exception types, not by creating an object of the class where the error occurred; therefore i, ii, and iv are true.

Q5. Which of the following methods will create string in Java? I : String S = “Hello Java”; II : String S2 = new String (“Hello Java”);

A Only I
B Only II
C Both I and II Correct
D Neither I nor II

Explanation

Both statements create a Java String. Statement I uses a string literal, and statement II uses the String constructor with the correct Java capitalization, new String(...). Therefore option C is correct.

You've seen 5 of 7 sample questions

Unlimited practice on OOP comes with the RAS Test Series + Practice pack. Sign up to save progress; practice sets open with a pack or Gate Pass.

More questions (pack required)

Pack unlocks practice

Q6.

A
B
C
D
Pack unlocks practice

Q7.

A
B
C
D

2 more questions can appear in generated practice.

Frequently Asked Questions

How many OOP MCQ questions are available?
There are 7 OOP practice MCQs available on Aspirant Academy, with detailed answers and explanations for each question.
Are answers and explanations provided for OOP MCQs?
Yes, every OOP question comes with the correct answer and a detailed explanation to help you understand the underlying concept.
How is OOP relevant to the RAS/RPSC exam?
OOP falls under the Data Processing & Programming (Basic CI) section of the RAS/RPSC syllabus. It is a frequently tested area and regular practice with these MCQs will strengthen your preparation.
Can I practice OOP questions in Hindi?
Yes, Aspirant Academy offers bilingual support. You can practice OOP MCQs in both English and Hindi, including questions, options, and explanations.

More Topics in Data Processing & Programming (Basic CI)

Continue your Data Processing & Programming (Basic CI) preparation with these related topics.

Explore Other Subjects

Want unlimited practice on OOP?

Unlimited practice comes with the RAS Test Series + Practice pack. Create a free account to save progress and choose a pack or Gate Pass when you are ready.

Browse all subjects