Which of the following data types can store a non-integer number?
- char
- float
- int
- short
In C++, the float data type is used to store single-precision floating-point numbers, which can represent non-integer values (like 3.14). It provides a way to store decimal numbers with a floating decimal point.
Loading...
Related Quiz
- What would be the result of instantiating a class template with a user-defined type that does not meet the template’s expected type requirements?
- Which of the following statements about the struct and class keywords is true?
- A specific version of a function template created for a particular data type is referred to as a template _______.
- How does an inline function improve the efficiency of a C++ program?
- Which method will you use to write a single character to the file stream in C++?