Hey thanks for reading. I was wondering if a variable is declared inside a loop what happens to the data after the loop is over. I read that every variable has a memory address and that is what a pointer points to. If you had a variable in a for statement after the loop ends what happens to the memory location?
At what point does a program write over that memory adress, or does it ever?Code:
for(int a = 0; a < 10; a++)