Using your favorite language and compiler, write a program that can tell the
order in which certain subroutine parameters are evaluated.
Consider the following (erroneous) program in C:
void foo() {
int i;
printf("%d ", i++);
}
int main() {
int j;
for (j = 1; j <=>
Local variable i in subroutine foo is never initialized. On many systems,
however, the program will display repeatable behavior, printing 01234
56789. Suggest an explanation. Also explain why the behavior on other
systems might be different, or nondeterministic.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here