Code:
main()
{
int a=10,b=20,c;
c = a+++b;
printf("%d",c);
}
how does this work???
|
Go4Expert Member
|
|
| 17Nov2012,20:45 | #1 |
|
Code:
main()
{
int a=10,b=20,c;
c = a+++b;
printf("%d",c);
}
how does this work??? |
|
Go4Expert Founder
|
![]() |
| 18Nov2012,10:32 | #2 |
|
++ increments a and next + is an addition
|
|
Go4Expert Member
|
|
| 18Nov2012,16:14 | #3 |
|
Go4Expert Member
|
|
| 28Nov2012,16:58 | #4 |
|
Just to add...
Maximum munch rule is follwed here. ie: It uses (a++ ) + b instead of a + (++b) |
|
Go4Expert Member
|
|
| 12Dec2012,02:21 | #5 |