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

Sir i need notes for structure,functions,pointers in c language can you help me please

2350


What do you mean by command line argument?

1098


Which function in C can be used to append a string to another string?

1177


What is the purpose of main( ) in c language?

1090


Tell me when would you use a pointer to a function?

1011


How to write a multi-statement macro?

989


Difference between constant pointer and pointer to a constant.

1065


What is c system32 taskhostw exe?

975


a program that can input number of records and can view it again the record

1864


Write a program to know whether the input number is an armstrong number.

1073


What is const keyword in c?

1122


What does calloc stand for?

1087


What is pass by value in c?

1005


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1002


what are the advantages of a macro over a function?

1096