Q. What is the keyword used to prevent a variable from being modified?

  • (A) static
  • (B) const
  • (C) volatile
  • (D) immutable
πŸ’¬ Discuss
βœ… Correct Answer: (B) const
Explanation: const ensures the variable value cannot be changed after initialization.
Explanation by: Mr. Dubey
const ensures the variable value cannot be changed after initialization.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
75
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate