What is the purpose of the 'volatile' keyword in programming languages like…

TPSC Computer/IT Posts 2026

What is the purpose of the 'volatile' keyword in programming languages like C/C++ ?

  1. A.

    Prevents variable optimization by the compiler

  2. B.

    Makes variable constant

  3. C.

    Allocates variable on heap

  4. D.

    Enables multi-threading

Attempted by 329 students.

Sign up free to check your answer

Sign up free

Explore the full course: Isro

Loading lesson…