C++ cout display the value of assignment statement

Description

C++ cout display the value of assignment statement

#include <iostream>
using namespace std;
int main()//from w  w  w  .  ja  va  2s  . c o  m
{
   int age = 18;
   cout << "The value of the first expression is " << (age + 5) << endl;
   cout << "The value of the second expression is " << (age = 30) << endl;
   cout << "The value of the third expression is " << (age == 40) << endl;
   return 0;
}



PreviousNext

Related