R

Ram Sharma • 193.86K Points
Coach

Q. Find output of below program.

Code:
int main()
{
int c1,c2;
int a = -8;
int b = 3;
c1 = --a + b;
c2 = a-- + b;
cout<<"c1="<<c1<<", "<<"c2="<<c2<<endl;

return 0;
}
  • (A) c1=-6,c2=-6
  • (B) c1=-4,c1=b-3
  • (C) c1=-7,c2=-3
  • (D) c1=-7,c2=-4
  • Correct Answer - Option(A)
  • Views: 105
  • 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