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 / pedda

i++ and ++i mean the same thing but they have differently
i++ define post increment that means when the function
is completely after that the value is increment
Example:
i=4 find d=i++ + i; d=9 because i++
initially the value is 4 so 4+4=8 after tha the value d is
increment so finally d value is 9
++i define pre increment that means when the function
is starting increment
Example:
i=4 find d=++i +i; d=9 ++i value is increment
starting so ++i value is 5 so d value is 9

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of malloc and calloc?

1887


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1241


What is %d called in c?

1208


What are the primitive data types in c?

1052


what is the role you expect in software industry?

2134


Why main function is special give two reasons?

1531


The statement, int(*x[]) () what does in indicate?

1126


Tell us the use of fflush() function in c language?

1131


What extern c means?

986


What is the use of bit field?

1162


Explain what are header files and explain what are its uses in c programming?

1135


Difference between strcpy() and memcpy() function?

1113


what is the difference between 123 and 0123 in c?

1189


write a program fibonacci series and palindrome program in c

1022


Explain the use of #pragma exit?

1163