View Single Post
Newbie Member
18Jul2012,11:10  
smallick's Avatar
#include<iostream.h>
#include<conio.h>
main()
{
int a=1;
clrscr();
int b=a+a++ +a++ +a++ ;
cout<<b<<a;

getch();
}

output is 8


#include<iostream.h>
#include<conio.h>
main()
{
int a=1;
clrscr();
int b=a+a+a++ +a++ +a++ ;
cout<<b<<a;

getch();
}

here one more 'a' is added to the statement. result is 8 this time also

compiler is TC