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
What is scope in c++ with example?
Write a program to find the reverse Fibonacci series starting from N.
Who created c++?
Explain how would you handle a situation where you cannot call the destructor of a local explicitly?
Can we use struct in c++?
Which should be more useful: the protected and public virtuals?
When does a name clash occur in c++?
What parameter does the constructor to an ofstream object take?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
Can we use this pointer in a class specific, operator-overloading function for new operator?
Array base access faster or pointer base access is faster?
Why ctype h is used in c++?
When can I use a forward declaration?
What is a literal in c++?
What is flag in computer?