Which is faster post increment or pre increment ? and in
which cases should u use either - to increase speed?

Answer Posted / mms zubeir

The above answer seems to be correct but for normal cases
also the behavior is as explained, it is not only for
overloaded case.

A little deeper, since a temporary object is introduced to
swap older and newer values, extra copying is required
which swallow its own CPU time. So the post increment
operator is a bit slower.

But this difference is feeble.

Is This Answer Correct ?    16 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why reinterpret cast is considered dangerous?

1900


Write a program to sort the number with different sorts in one program ??

1914


Where is pseudocode used?

563


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6485


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1147






What does sksksk mean in text slang?

1534


What is the advantage of oop over procedural language?

625


What exactly is polymorphism?

604


Can an interface inherit a class?

557


What is inheritance in simple words?

625


What is polymorphism give a real life example?

559


Why we use classes in oop?

578


What is the real time example of inheritance?

639


Can enum be null?

585


What is pure oop?

597