Hello Everyone
I am new to this forum. I am sorry if this question is already discussed on forum but I really don't understand clearly life time of variable.
I don't understand how variable create and destroy regrades memory ?Code:#include <stdio.h> int main(void) { // start scope1 int i = 2; for (int j = 0; j < 5; ++j) { //start scope2 // j can be only accessible within scope 2 printf("Hello \n"); }// End scope2 printf("%d", i); // I can accessible within scope 1 and scope 2 return 0; }// End scope1