+ 2
Memory allocation in C.
Can anyone explain me when memory is allocated for the variable. Is it allocated during variable declaration or variable definition?
1 Réponse
+ 1
When its declared. Thats why you need to specify the type.
when i initialize:
int n;
//The program beggs for space for the integer. You can find how much memory is set aside using sizeof() on any data type