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

given post order,in order construct the corresponding binary tree

2854


write a program fibonacci series and palindrome program in c

1097


Why main is used in c?

1128


What is the benefit of using an enum rather than a #define constant?

1319


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1169


Explain the difference between #include "..." And #include <...> In c?

1088


How do you generate random numbers in C?

1246


Explain b+ tree?

1126


Differentiate between static and dynamic modeling.

1185


What is a rvalue?

1260


Explain how do you view the path?

1222


How do we print only part of a string in c?

1078


What is s or c?

1118


Explain how do you sort filenames in a directory?

1076


Why should I use standard library functions instead of writing my own?

1313