Time left:

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


1. ► A constant function cannot have side-effects

A.
B.

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

A.
B.

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

A.
B.

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

A.
B.

5. ► Templates allow optimizations because of:

A.
B.
C.

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

A.
B.

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

A.
B.

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

A.
B.

9. ► Templates are type-safe

A.
B.

10. ► Template compilation is slow because of:

A.
B.
C.

11. ► Constants allow compiler optimizations

A.
B.

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

A.
B.

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

A.
B.

14. ► Templates are mostly used for generic containers

A.
B.

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

A.
B.

16. ► Template types are checked at run-time

A.
B.


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