On 5/13/05, Paul Koning <pkoning at equallogic.com> wrote:
>> >> int i = 0; >> printf("%d
%d %d\n",i++,i++,i++);
I think the answer is that it should display 3
numbers, each in the
range 0 to 2.
That is the "likely" answer. (Actually I'd say that the "likely"
answer is that it prints three numbers in the range 0 to 2 and
afterwards the value of i is in the range 1 to 3)
There is no "should" answer. A compiler can do whatever it wants with
this code including generating an exception, printing the Gettysburg
address, and the aforementioned nasal demons.
Eric