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
What is the benefit of encapsulation?
What is iterator c++?
Write a program in C++ for Fibonacci series
What are the various access specifiers in c++?
What are the advantages of using friend classes?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What are function prototypes?
What are separators in c++?
Can you please explain the difference between static and dynamic binding of functions?
How do we balance an AVL Tree in C++?
What is tellg () in c++?
Differentiate between late binding and early binding. What are the advantages of early binding?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?