Multiple choice technology programming languages

Which of the following is used for casting inherently incompatible pointers.

  1. static_cast

  2. reinterpret_cast

  3. dynamic_cast

  4. const_cast

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

reinterpret_cast is used for casting inherently incompatible pointer types. It simply reinterprets the bit pattern without any type safety checks, making it the most dangerous but flexible casting option for unrelated types.