The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
3answers
600 views

Algorithm for recursive evaluation of postfix expressions

I'm reading Sedgewick's book on algorithms in C and I'm looking for an algorithm to evaluate postfix expressions (addition and multiplication only) without using a stack. I tried to implement one but ...
3
votes
8answers
901 views

Are there real world applications where the use of prefix versus postfix operators matters?

In college it is taught how you can do math problems which use the ++ or -- operators on some variable referenced in the equation such that the result of the equation would yield different results if ...
2
votes
11answers
7k views

Avoid Postfix Increment Operator

I've read that I should avoid the postfix increment operator because of performance reasons (in certain cases). But doesn't this affect code readability? In my opinion: for(int i = 0; i < 42; ...
51
votes
10answers
2k views

Why do we have postfix increment?

Disclaimer: I know perfectly well the semantics of prefix and postfix increment. So please don't explain to me how they work. Reading questions on stack overflow, I cannot help but notice that ...