Q. What is the output of the following code snippet? int x = 5; cout << x++;

  • (A) 5
  • (B) 6
  • (C) 0
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) 5
Explanation: The post-increment operator (x++) returns the original value of x before incrementing it.
Explanation by: Admin
The post-increment operator (x++) returns the original value of x before incrementing it.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
175
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
98%
Success Rate