Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between i++ and ++i?

Answer Posted / geetha

i++ and ++i mean the same thing when they form statements
independently,they behave differently.
for example:
i=5;
d=++i;
in this case the value is i,d =6.bcoz first increment and
next assign the value
i=5;
d=i++;
in this case the value of d=5 and i=6.bcoz first assign the
value next increment and it will be change the value i=6.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I find out the size of a file, prior to reading it in?

1180


What is unsigned int in c?

1007


How can you allocate arrays or structures bigger than 64K?

1149


How do you use a 'Local Block'?

1174


Where are the auto variables stored?

1154


Explain data types & how many data types supported by c?

1085


What is #pragma statements?

1103


What is getch?

1196


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1325


Explain the use of bit fieild.

1142


Explain what are compound statements?

1064


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1085


What is meant by recursion?

1055


Why C language is a procedural language?

1042


How are variables declared in c?

1104