Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

TCP1121 - Quiz 6 Bonus

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

During compilation, the compiler will produce a separate definition for every data type that uses the template.

a)

True

b)

False

2.

Which of the below is CORRECT in declaring an object using class template?

a)

Pair p1<int>;

b)

Pair <int> p1;

c)

Pair (int) p1;

d)

Pair p1 (int);

3.

Elements are added to a vector using the member function push_back()

a)

TRUE

b)

FALSE

4.

Friendship is bi-directional in C++.

a)

TRUE

b)

FALSE

5.

Friendship allows a class to selectively grant other function or class the access to its private and protected members.

a)

TRUE

b)

FALSE

6.

Exception is a compile-time error caused by some abnormal conditions.

a)

TRUE

b)

FALSE

7.

Use keyword ______ in ________ block to signal that abnormal condition or error has occured.

a)

throw; try

b)

try; throw

c)

try; catch

d)

throw; catch

8.

We can have many catch blocks but only one try block.

a)

TRUE

b)

FALSE