Multiple choice technology programming languages

Which keyword is used to prevent the values being changed?

  1. Static

  2. Const

  3. Preserve

  4. ReadOnly

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

The 'Const' keyword declares constants, values that cannot be modified after initialization, which is the standard way to prevent value changes across programming languages. 'Static' controls variable lifetime and scope, 'Preserve' is specific to array operations in Visual Basic, and 'ReadOnly' is a more nuanced modifier that allows initialization at runtime rather than compile-time.