Saturday, September 12, 2009

postfix/prefix lol

C/C++ and Java

Valid:

int a = 0;
int b = a++ + ++a;

Not valid:

int a = 0;
int b = a+++++a;

Too bad, right? It looks so fun.

No comments: