πŸ“Š C++
Q. Which of the following is the correct way to declare a constant in C++?
  • (A) const int x = 10;
  • (B) int const x = 10;
  • (C) Both A and B
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both A and B

Explanation: Both 'const int x = 10;' and 'int const x = 10;' are correct ways to declare a constant in C++.

Explanation by: Vijay Sangwan
Both 'const int x = 10;' and 'int const x = 10;' are correct ways to declare a constant in C++.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
122
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vijay Sangwan
Publisher
πŸ“ˆ
98%
Success Rate