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 advantage of c++ over c?
What is the disadvantage of using a macro?
What is the basic concept of c++?
Can manipulators fall in love?
What is the difference between map and hashmap in c++?
Is c++ slower than c?
What is this weird colon-member (" : ") syntax in the constructor?
What is the difference between multiple and multilevel inheritance in c++?
What is main function in c++ with example?
What is an overflow error?
Describe linkages and types of linkages?
What is the difference between structure and class?
What is a forward referencing and when should it be used?
What is class invariant in c++?
Write a code/algo to find the frequency of each element in an array?