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 need of a destructor?
What is protected inheritance?
Can we use this pointer inside static member function?
What are the steps in the development cycle?
State the difference between delete and delete[].
What is virtual destructor? What is its use?
Explain binary search.
What is the use of endl?
What is the difference between passing by reference and passing a reference?
Show the declaration for a static member variable.
Comment on c++ standard exceptions?
What is constructor and destructor in c++?
Write about an iterator class?
what are the decision making statements in C++? Explain if statement with an example?
What is scope operator in c++?