Which of the following data types is suitable for storing a character in C++?
- boolean
- char
- float
- int
In C++, the char data type is specifically designed to store characters. It typically occupies 1 byte in memory and can represent a single character from the ASCII table.
Loading...
Related Quiz
- If an exception is thrown and not caught anywhere in the program, function _______ is called.
- How can a function indicate that it will not throw any exceptions?
- You're developing an embedded system with constrained memory. What should be the main consideration when choosing between using float and double data types?
- What is the use of a catch block with an ellipsis (...)?
- What is the difference between break and continue in the context of a loop?