Q. What is the output of the following C++ code?

Code:
#include <iostream>
using namespace std;
int main()
{
  int x = 2, y = 3, z, w;
  z = x, y;
  w = (x, y);
  cout << z << ' ' << w;
  return 0;
}
  • (A) 2 2
  • (B) 3 3
  • (C) 2 3
  • (D) 3 2
πŸ’¬ Discuss
βœ… Correct Answer: (C) 2 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
177
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
97%
Success Rate