Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Strange Expression Result

$
0
0
In C,
when I have, code lines as

int i,c ;
i = 5 ;
c = ++i + ++i ;



it produces output(value of c) as 14, and when I have code lines as

int i=5 ;
int c = ++i + ++i ;



it produces output(value of c) as 13. What's the difference between these two codes and what's really happening in there?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>