πŸ“Š C++
Q. What is the purpose of the 'static' keyword in C++?
  • (A) To define a global variable
  • (B) To define a constant variable
  • (C) To limit the scope of a variable to its function
  • (D) To make a variable accessible to all functions
πŸ’¬ Discuss
βœ… Correct Answer: (C) To limit the scope of a variable to its function

Explanation: The 'static' keyword in C++ is used to limit the scope of a variable to the function or file in which it is declared.

Explanation by: Gopal Sharma
The 'static' keyword in C++ is used to limit the scope of a variable to the function or file in which it is declared.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
86
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
95%
Success Rate