Quick Print – CSKC
Sign In

Search

siteicon
Solved Problem #CPP#2314 Back

Problem Statement - Assignment, equality comparison problem

Find the output of the program given below. Assume all relevant header files are included

int main( )
{
  int a,b,c=101,d=102;
  a=(c=d);
  cout<<a<<endl;
  b=(c==d);
  cout<<b<<endl;
  return 0 ;
}

Solution

		 

Run Output

102
1