Which keyword is used to define a template in C++?
- class
- public
- private
- template
The template keyword is used to define templates in C++. Templates allow functions and classes to operate with generic types, enabling more flexible and reusable code structures.
Loading...
Related Quiz
- How does the short-circuit evaluation work in logical operators?
- What is the initial statement in a for loop typically used for?
- In a graphics rendering engine, you need to store RGB color values. Which data type would be most appropriate for each color channel to balance memory usage and color depth?
- Unlike if-else, switch-case in C++ does not support _______ type for case values.
- What is the potential risk of using exception specifications like throw(type)?