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...

Why preincrement operator is faster than postincrement?

Answer Posted / puneet nagpal

postincrement did not increment unless it find ; so it increments after the end of statement. while the preincrement operator increment before the end of statement. so preincrement operator is faster than postincrement operator.
ex- a=10;
a++;value incremented after the end of statement but
at this point value is 10.
a++;now the value is incremented to 11.
++a; preincrement incremented within the statement now
the value is 12.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which operator cannot be overloaded c++?

1012


Which ide is best for c++?

1041


What do you understand by a pure virtual member function?

1003


Is it possible for a member function to use delete this?

1075


What are the four partitions in which c++ compiler divides the ram?

1232


Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

1246


How do you define/declare constants in c++?

1047


What are the advantages of using const reference arguments in a function?

1077


Define friend function.

1043


Eplain extern keyword?

1026


What is c++ good for?

1060


What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor

1144


Define linked lists with the help of an example.

1022


What is the maximum combined length of command line arguments including the space between adjacent arguments?

995


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

2577