C
ccwork
Hi all,
In CFAQ 3.1, it says:
A: Under my compiler, the code
int i = 7;
printf("%d\n", i++ * i++);
prints 49. Regardless of the order of evaluation, shouldn't it print
56?
Q: ...the language in K&R suggests that the behavior of this expression
is unspecified, the C Standard makes the stronger statement that it is
undefined...
I think this is interesting. What metrics can we use to determine it is
undefined or unspecified? A similar case is:
f(a++, a);
People says the order of evaluation for function arguments is
undefined. Why can't it be unspecified?
In CFAQ 3.1, it says:
A: Under my compiler, the code
int i = 7;
printf("%d\n", i++ * i++);
prints 49. Regardless of the order of evaluation, shouldn't it print
56?
Q: ...the language in K&R suggests that the behavior of this expression
is unspecified, the C Standard makes the stronger statement that it is
undefined...
I think this is interesting. What metrics can we use to determine it is
undefined or unspecified? A similar case is:
f(a++, a);
People says the order of evaluation for function arguments is
undefined. Why can't it be unspecified?