Vidyalelo
Computer Science · all questions

Object Oriented Programming Using C++
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

535

Questions

7/27

Page

Pick an option on a question to see the right answer and solution.

When accessing a structure member, the identifier to the left of the dot operator is the name of

Select an option to see the answer and solution.

Assume that a program contains a programmer-defined void function. When C++ encounters the function's closing brace (}), C++ returns to the statement _____

Select an option to see the answer and solution.

Inheritance occurs when a class adopts all the traits of _________

Select an option to see the answer and solution.

Template classes that have already been written to perform common class tasks are called _____

Select an option to see the answer and solution.

A _____ is a single item of information about a person, place, or thing

Select an option to see the answer and solution.

Which (if any) of the following is NOT a programmer-defined type

Select an option to see the answer and solution.

Assume a program contains a void function named displayName, which requires no formal parameters. Which of the following is a correct function prototype for this function?

Select an option to see the answer and solution.

A file pointer always contains the address of the file

Select an option to see the answer and solution.

You declare a function with a function _____, which is typically entered at the beginning of the program, below the #include directives

Select an option to see the answer and solution.

The function whose prototype is Item getData(void); returns _____

Select an option to see the answer and solution.

Using new may result in less _____ memory than using an array

Select an option to see the answer and solution.

The most common operation used in constructors is

Select an option to see the answer and solution.

In a simple 'if' statement with no 'else'. What happens if the condition following the 'if is false?

Select an option to see the answer and solution.

If two types of errors may be thrown, you should write _______

Select an option to see the answer and solution.

The name of a function ends with

Select an option to see the answer and solution.

Which of the following is not a programming control structure?

Select an option to see the answer and solution.

The bitwise OR operator is a

Select an option to see the answer and solution.

A class Stockltems has four data members and three function members. You define 50 objects as members of the class. Which is true?

Select an option to see the answer and solution.

The continue statement should be written only

Select an option to see the answer and solution.

A major advantage of inheritance is

Select an option to see the answer and solution.