Why preincrement operator is faster than postincrement?

Answer Posted / sanish joseph

the pre inc operator increments the value of that particular
variable on that line itself

the post inc operator increments the value of that
particular variable after going on the next line

in simple words

eg.

e=5; on this line value of e=5

e++; on this line value of e=5

++e; on this line value of e=7

Is This Answer Correct ?    27 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do vectors start at 0 c++?

533


What is pointer to array in c++?

615


Do inline functions improve performance?

647


List the issue that the auto_ptr object handles?

609


What is an undefined behavior and sequence points

566






How do you write a function that can reverse a linked-list?

572


Explain Memory Allocation in C/C++ ?

634


What is name hiding in c++?

611


Explain one-definition rule (odr).

644


How can you tell what shell you are running on unix system?

639


What is a set in c++?

531


What is the use of turbo c++?

551


What are the restrictions apply to constructors and destructors?

642


Explain function overloading

585


What is a pdb file?

535