WorksheetsTCP1121 - Quiz 6 Bonus
Total questions: 8
Worksheet time: 4mins
During compilation, the compiler will produce a separate definition for every data type that uses the template.
True
False
Which of the below is CORRECT in declaring an object using class template?
Pair p1<int>;
Pair <int> p1;
Pair (int) p1;
Pair p1 (int);
Elements are added to a vector using the member function push_back()
TRUE
FALSE
Friendship is bi-directional in C++.
TRUE
FALSE
Friendship allows a class to selectively grant other function or class the access to its private and protected members.
TRUE
FALSE
Exception is a compile-time error caused by some abnormal conditions.
TRUE
FALSE
Use keyword ______ in ________ block to signal that abnormal condition or error has occured.
throw; try
try; throw
try; catch
throw; catch
We can have many catch blocks but only one try block.
TRUE
FALSE
