πŸ“Š C++
Q. What will be the output of the following C++ code?
Code:
        #include <iostream>
        using namespace std;
        int main()
        {
            int a = 5;
            float b;
            cout << sizeof(++a + b);
            cout << a;
            return 0;
        }
  • (A) 2 5
  • (B) 4 6
  • (C) 2 6
  • (D) 4 5
πŸ’¬ Discuss
βœ… Correct Answer: (D) 4 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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