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

Write a program which uses Command Line Arguments

1112


Show the declaration for a static member variable.

954


What does h mean in maths?

1106


Explain how we implement exception handling in c++?

1008


How can I learn dev c++ programming?

978


what are the iterator and generic algorithms.

1912


How a new element can be added or pushed in a stack?

961


Which software is used for c++ programming?

1037


How would you implement a substr() function that extracts a sub string from a given string?

993


What is basic if statement syntax?

1009


Define pointers?

1006


What is the use of register keyword with the variables?

895


What is the most common mistake on c++ and oo projects?

926


What is the difference between prefix and postfix versions of operator++()?

1026


What are the various storage classes in C++?

1088