What this C++ floating-point types question tests
This is an easy question that probes foundational knowledge of C++ numeric types. It checks whether you can distinguish between the distinct floating-point categories in the language, as opposed to confusing them with their various machine-specific or library-defined width variants.
Interviewers ask this to confirm you have a solid grasp of the standard type system—a baseline expectation for anyone writing performance-critical code in C++. The question deliberately excludes width-specific types (like float16_t) to focus on the core language types themselves, not on platform extensions or the standard library's fixed-width type definitions.
- Standard floating-point type hierarchy in C++
- Distinguishing language types from typedef aliases and width variants
- The
<cfloat> and <limits> headers