++i + ++i + ++i in Java vs C -


possible duplicate:
how explain result of expression (++x)+(++x)+(++x)?

int i=2; = ++i + ++i + ++i; 

which more correct? java's result of 12 or c = 13. or if not matter of correctness, please elaborate. thank you.

there nothing more correct. undefined , called sequence point error. http://en.wikipedia.org/wiki/sequence_point


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -