Time left:

[All Quizzes] → [Programming With C++] → [Constants and Templates]


1. ► Templates can be used to provide compile time constraints

A.
B.

2. ► A constant function cannot have side-effects

A.
B.

3. ► In ‘int * const’, interger value is a constant

A.
B.

4. ► dynamic_cast is used to find out the exact type of template class at run-time

A.
B.

5. ► ‘int *’ is same as ‘const int *’

A.
B.

6. ► Constants allow compiler optimizations

A.
B.

7. ► Template compilation is slow because of:

A.
B.
C.

8. ► Templates are used for making a function or a class type agnostic

A.
B.

9. ► Template types are checked at run-time

A.
B.

10. ► ‘const int *’ is same as ‘int const *’

A.
B.

11. ► Templates are mostly used for generic containers

A.
B.

12. ► Templates are type-safe

A.
B.

13. ► Templates allow optimizations because of:

A.
B.
C.

14. ► Using const is a good design practice to avoid the possibility of side-effects

A.
B.

15. ► C++ doesn’t allow type mismatches

A.
B.

16. ► A const value can be made to change via static_cast

A.
B.


© 2016 VirtuQ™ Education All right reserved. | Terms of Use | Privacy Policy