type casting in cpp

  1. Static Cast: It is used for conversions that don't perform run-time type checking.

  2. Dynamic Cast: It is used for conversions that perform run-time type checking.

  3. Const Cast: It is used to add or remove const qualifier from a variable.

  4. Reinterpret Cast: It is used for type casting that can change the type of a pointer to any other type.