Question: Consider the following (erroneous) program in C: Local variable i in subroutine foo is never initialized. On many systems, however, the program will display repeatable
Consider the following (erroneous) program in C:
Local variable i in subroutine foo is never initialized. On many systems, however, the program will display repeatable behavior, printing 0 1 2 3 4 5 6 7 8 9. Suggest an explanation. Also explain why the behavior on other systems might be different, or nondeterministic.
void foo() { int i; printf ("%d ", i++); int main() { int j; for (j = 1; j
Step by Step Solution
3.40 Rating (163 Votes )
There are 3 Steps involved in it
In most language implementations the activation records for ... View full answer
Get step-by-step solutions from verified subject matter experts
