R

Ram Sharma • 193.86K Points
Coach

Q. What is the output of below program?

Code:
#include<iostream.h>
void Execute(int &x, int y = 200)
{
 int TEMP = x + y;
 x+= TEMP;
 if(y!=200)
     cout<<TEMP<<x<<y"--";
}

int main()
{
 int A=50, B=20;
 cout<<A<<B<<"--";
 Execute(A,B);
 cout<<A<<B<<"--";
 return 0;
}
  • (A) 5020--7050200--5020--
  • (B) 5020--70120200--5020
  • (C) 5020--7012020--12020--
  • (D) 5020--5020--
  • Correct Answer - Option(C)
  • Views: 112
  • Filed under category C++

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics