Now here are codes of two programs similar to each other, yet different in assigning value to an integer type variable...
PROGRAM1:
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
b=3;
a=2;
c = (a,b); // assingning done through brackets
cout<<c<<endl;
system("pause");
return 0;
}
OUTPUT1: 3
PROGRAM2:
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
b=3;
a=2;
c = a,b;// no brackets are being used
cout<<c<<endl;
system("pause");
return 0;
}
OUTPUT 2: 2
I can't understand how is the assigning of int variable c done in the two problems given above...please help