employer cover photo
employer logo

Nuance Interview Question

Do you know why we prefer prefix increment operator in somewhere like a for loop?

Interview Answer

Anonymous

Oct 20, 2016

Because the postfix operator will create a temporary object. The performance cost is especially high when we use the postfix operator on class' object rather than types like built-in integer (int).