Skip to main content

Timeline for answer to How to set int array pointer within for loop in c by ssh_ila

Current License: CC BY-SA 4.0

Post Revisions

4 events
when toggle format what by license comment
Oct 31, 2025 at 15:04 comment added Thibe Welcome to stackoverflow. I recommend to make a small edit and give a hint that this is undefined behaviour (which of course was not intended)
Oct 31, 2025 at 13:57 comment added 3CEZVQ In the second loop, i is declared again in a different scope, so it gets a new memory address — it’s no longer 0xabab. This is not true generally. This is implementation detail, and the second i can re-use the storage of the first i.
S Oct 31, 2025 at 12:49 review First answers
Oct 31, 2025 at 15:05
S Oct 31, 2025 at 12:49 history answered ssh_ila CC BY-SA 4.0