Why preincrement operator is faster than postincrement?

Answer Posted / shakti singh khinchi

Because post increment operator uses a temporary variable to
store the incremented value for a variable until it is used
in the next executed statement, whereas pre increment
operator not using any temp variable, it is just increase
that value at the time of execution using reference.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 types of library?

591


What is jump statement in C++?

613


Give 10 points of differences between C & C++.

619


What is object in c++ example?

621


Why was c++ created?

544






What c++ library is string in?

568


Can union be self referenced?

571


What are the various operations performed on stack?

627


How to get the current position of the file pointer?

550


What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?

611


Why do we use string in c++?

507


What is the real purpose of class – to export data?

612


What are the new features that iso/ansi c++ has added to original c++ specifications?

583


How can an improvement in the quality of software be done by try/catch/throw?

586


What is c++ course?

576