Which header file do you need to include to use typecasting?
-
stdin.h
-
ctype.h
-
math.h
-
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.