Multiple choice

When there is a requirement to convert a const(constant) to non-const(non constant), which keyword is to be used?

  1. cast_const

  2. no_const

  3. non_const

  4. const_cast

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

The const_cast can be used to convert a constant to non-constant. It can also be used to convert the data member of a class from the const functions.