Multiple choice technology programming languages

Which header file do you need to include to use typecasting?

  1. stdin.h

  2. ctype.h

  3. math.h

  4. None

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Typecasting is a fundamental language feature in C++, not a library function. No header file is needed to use C-style casts (int)x or C++ casts static_cast(x). Options A, B, and C are all real headers but for different purposes (stdio, character types, math functions). Typecasting syntax is built into the compiler.

AI explanation

To use typecasting in C/C++, you do not need to include any specific header file. Typecasting is a built-in feature of the C/C++ language and does not require any additional header files.

The correct answer is D) None.