sailaxmi


{ City } hyderabad
< Country > india
* Profession *
User No # 101298
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 6
Users Marked my Answers as Wrong # 1
Questions / { sailaxmi }
Questions Answers Category Views Company eMail




Answers / { sailaxmi }

Question { 14614 }

what is the diffrence between ++x , x++ pleaaaaase ???


Answer

++x is pre-increment

say for example
the value of a=1
int a,r;
r= ++a;

now the value of "a" is incremented to 2 n then assigned to r...


x++ is post increment
say for exmaple

the value of a is 3

int a,r;
r=a++;

the value of a(initially 3) will be assigned to r..... n
then the value of "a" gets incremented to 4.

Is This Answer Correct ?    6 Yes 1 No