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

What is called array?

1085


Do vectors start at 0?

990


What is a linked list in c++?

1050


What is protected inheritance?

1049


What is bubble sort c++?

1007


What is an arraylist c++?

1220


Explain differences between alloc() and free()?

1138


Explain "const" reference arguments in function?

1054


What apps are written in c++?

1102


If a header file is included twice by mistake in the program, will it give any error?

1053


What is the benefit of c++?

1134


Explain container class.

1244


What do the keywords volatile and mean mutable?

1052


What is c++ stringstream?

1104


What is the difference between a definition and a declaration?

1071