Top 80+ Solved Object Oriented Programming (OOP) MCQ Questions Answer
Q. Classes are useful because they
a. can closely model objects in the real world.
b. permit data to be hidden from other classes.
c. bring together all aspects of an entity in one place.
d. options a, b and c
Q. For the object for which it was called, a const member function
a. can modify both const and non-const member dat
b. can modify only const member data.
c. can modify only non-const member data.
d. can modify neither const nor non-const member data.
Q. Dividing a program into functions
a. is the key to object-oriented programming.
b. makes the program easier to conceptualize.
c. may reduce the size of the program.
d. option b and c
Q. An expression
a. usually evaluates to a numerical value.
b. may be part of a statement.
c. always occurs outside a function.
d. option a and b
Q. A function’s single most important role is to
a. give a name to a block of code.
b. reduce program size.
c. accept arguments and provide a return value.
d. help organize a program into conceptual units.
Q. A function argument is
a. a variable in the function that receives a value from the calling program.
b. a way that functions resist accepting the calling program’s values.
c. a value sent to the function by the calling program.
d. a value returned by the function to the calling program.
Q. Which of the following can legitimately be passed to a function?
a. a constant
b. a variable
c. a structure
d. all of the above
Q. When an argument is passed by reference
a. a variable is created in the function to hold the argument’s value.
b. the function cannot access the argument’s value.
c. a temporary variable is created in the calling program to hold the argument’s value.
d. the function accesses the argument’s original value in the calling program.
Q. Overloaded functions
a. are a group of functions with the same name.
b. all have the same number and types of arguments.
c. make life simpler for programmers.
d. a and c