Skip to content
GK24
GK QuizComputer Awareness

Computer Awareness Quiz: Object-Oriented Programming Concepts

  • 12 questions
  • 12 minutes
  • Difficulty: Medium

About this quiz

This Computer Awareness quiz on Object-Oriented Programming Concepts puts 12 multiple-choice questions to you, the verified MCQs published with GK24's note on the topic. Every question carries a full explanation of why the correct option is right and why the other options are wrong, so you learn the fact behind the answer rather than the letter. Attempt it right after reading the note, keep to the timer, and use the explanations at the end to mark what needs another look. Sit it again before the exam as a quick revision of the topic.

Questions in this quiz

12 questions with answers and explanations

Q3.Computer AwarenessEasy

Wrapping up of data and the functions that operate on that data into a single unit is called

  1. A.Inheritance
  2. B.Encapsulation
  3. C.Overloading
  4. D.Compilation
Show answer
Correct answer: B. Encapsulation

Encapsulation means binding the data members and the member functions that act on them inside one unit, the class, and keeping the data private so that it can be reached only through the methods provided; the standard illustration is a capsule holding the medicine inside it.

Read the full explanation →
Q4.Computer AwarenessMedium

Showing only the essential features of an object to the user while hiding its internal details is known as

  1. A.Abstraction
  2. B.Encapsulation
  3. C.Inheritance
  4. D.Instantiation
Show answer
Correct answer: A. Abstraction

Abstraction presents only what the user needs, such as the accelerator and brake of a car, and keeps the internal working out of sight; in C++ it is obtained through abstract classes with pure virtual functions and in Java through interfaces and abstract classes.

Read the full explanation →
Q5.Computer AwarenessEasy

Who developed the C++ programming language?

  1. A.Dennis Ritchie
  2. B.James Gosling
  3. C.Bjarne Stroustrup
  4. D.Guido van Rossum
Show answer
Correct answer: C. Bjarne Stroustrup

Bjarne Stroustrup developed the language at Bell Laboratories, starting it as C with Classes and giving it the name C++ in 1983; it adds classes, inheritance and polymorphism to C while keeping C procedural power, which is why it is called a hybrid language.

Read the full explanation →
Q7.Computer AwarenessMedium

In object-oriented programming, the ability of the same function name to work with different sets of parameters is called

  1. A.Inheritance
  2. B.Encapsulation
  3. C.Function overloading
  4. D.Function overriding
Show answer
Correct answer: C. Function overloading

Overloading means defining several functions of the same name in the same class with different numbers or types of parameters, so the compiler decides which one to call; because the decision is taken before the program runs, it is called compile-time or static polymorphism.

Read the full explanation →
Q8.Computer AwarenessEasy

Which statement about a class and an object is correct?

  1. A.A class is an instance of an object
  2. B.An object is a blueprint and a class is its instance
  3. C.A class is a blueprint and an object is its instance
  4. D.A class and an object both occupy memory in the same way
Show answer
Correct answer: C. A class is a blueprint and an object is its instance

A class only describes the data members and member functions that its objects will have, while an object is created from the class, occupies memory and holds actual values; one class may have any number of objects.

Read the full explanation →
Q12.Computer AwarenessMedium

In C++, members of a class declared as private can be accessed

  1. A.From anywhere in the program
  2. B.Only within the same class
  3. C.Within the class and its derived classes
  4. D.Only from the main function
Show answer
Correct answer: B. Only within the same class

Private is the most restricted access specifier and is also the default for a C++ class, so private data members can be read or changed only by the member functions of that class, and by a friend function or friend class if one is declared.

Read the full explanation →
View all quizzes