The variable defined and initialized with the value the beginning
Variable shadowing Assignment Answers
Question:
int z = 10;
cout << "something else";
}
Variable shadowing Answer and Explanation
1. The outer `z` is initialized to `10`.
2. The first `for` loop declares a new `int z`, which is scoped only within the loop. This local `z` starts at `0` and increments up to `3` (less than `4`). Inside this loop, `"something"` is printed four times.
something
something
10