Why preincrement operator is faster than postincrement?

Answer Posted / ranjeet garodia

Pre increment operator is use the concept of value by
reference that means it increment the actual object.

While post increment use call by value concept that is it
create the local object, operate on that, then it will
increment actual object, so takes time to create local
object

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is input operator in c++?

765


What is jump statement in C++?

780


What is c++ iterator?

827


Name the debugging methods that are used to solve problems?

744


Which is best c++ or java?

830






Where are setjmp and longjmp used in c++?

820


How can you quickly find the number of elements stored in a dynamic array?

781


What are advantages of c++?

764


Describe delete operator?

818


What does extern mean in a function declaration in c++?

901


Which bitwise operator is used to check whether a particular bit is on or off?

783


What are stacks? Give an example where they are useful.

756


What is scope in c++ with example?

819


Can I run c program in turbo c++?

747


what is the difference between overloading & overriding? give example.

762