/  CPP-Programming-Quiz-10

This Quiz contains totally 10 Questions each carry 1 point for you.

1. The public files in a class library usually contain
Variable definition
Class declarations
Constant definitions
Member function definitions

Correct!

Wrong!

2. The member function can always access the data in
Any object of the class of which it is a member
The public part of its class
The class of which it is member
The object of which is a member

Correct!

Wrong!

3. In a stock, the data item placed on the stack first is
Given as index zero
Not given as index number
The first data item to be removed
The last data item to be removed

Correct!

Wrong!

4. Breaking a program into several files is desirable because
A program can be divided functionally
Each programmer can work on a separate file
Some files don’t need to be recompiled each time
Files can be marketed in object form

Correct!

Wrong!

5. Turbo C++ library function can be used
Draw lines and circles
Write text in a variety of fonts and sizes
Color any closed figure
All the above

Correct!

Wrong!

6. In new operator
Each link contains data or a pointer to data
Each link contains a pointer to the next link
Links are stored in an array
An array of pointers point to the links

Correct!

Wrong!

7. A virtual base class is useful when
It makes sense to use a base class is ambiguous
Identification of a function in a base class is ambiguous
There are multiple paths from one derived class to another
Different functions in base and derived classes have the same name

Correct!

Wrong!

8. The keyword void is used to declare
Objects that can be modified outside of program control
A synonym for an existing type
A member function that is defined in a subclass
Absence of a type

Correct!

Wrong!

9. Virtual functions allow to
Use same function call to execute member functions of objects from different classes
Group objects of different classes so they can all be accessed by the same function code
Create functions that have no body
Create an array of type pointer to base calls that can hold pointers to derived classes

Correct!

Wrong!

10. Classes are useful because they
Can closely model objects in the real world
Bring together all aspects of an entity in one place
Permit data to be hidden from other classes
Are removed from memory when not in use

Correct!

Wrong!

Share the quiz to show your results !

Subscribe to see your results

Ignore & go to results

CPP-Programming-Quiz-10

You got %%score%% of %%total%% right

%%description%%

%%description%%

Where to go ?

Quizzes

Loading...