Anasayfa » pre-increment and post-increment in c

pre-increment and post-increment in c etiketindeki yazılar

C / C++ »

[25 Ara 2010 | 2 Yorum | 1.921 views ]
C / C++ Courses ? 10 (Pre-increment and Post-increment)

Pre-increment and Post-increment

Pre-increment changes the value of the variable, and then makes the calculation or processes which should be done. (It?s written like this: ?++x ?)

Post-increment makes the processes and then changes the value of the variable. (It?s written like this: ?++x ?)

Decrement versions of these are the same. (?–x? or? x–?)

int x=3;

printf(?%d?, ++x); //it will change the value of x to 4 and then print 4…

Devamını Oku »