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
How can virtual functions in c++ be implemented?
How to give an alternate name to a namespace?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
what you know about c++?
How do you decide which integer type to use?
Define a nested class. Explain how it can be useful.
How is data hiding achieved in c++?
What does obj stand for?
How to tokenize a string in c++?
How the endl and setw manipulator works?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
How do you clear a buffer in c++?
How can you quickly find the number of elements stored in a static array?
What are the two main components of c++?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?