πŸ“Š C++
Q. What is the output of this program?
Code:
#include <iostream> 
    using namespace std;
    int main()
    {
        int num1 = 7;
        int num2 = 4;
        int num3 = 6;
        num1 = num2++;
        num2 = --num3;
        cout << num1 <<" " << num2 <<" " << num3;
        return 0;
    }
  • (A) 5 4 5
  • (B) 5 5 4
  • (C) 4 5 5
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 4 5 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
260
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Rajeev Malhotra
Publisher
πŸ“ˆ
82%
Success Rate