Memory allocation at run time
Can someone clarify what's memory allocation at run time ?
When I need to write a program I write it on editor and save it. when i compile/run program. compiler allocate memory. if there is error in code compiler show error. if there is no error then compiler show result
Code:
#include<stdio.h>#include<stdlib.h>
int main ()
{
int *x = malloc(sizeof(*x)); // allocate dynamic memory for x
*x = 1;
printf( "x = %d\n", *x);
return 0;
}
In a program dynamic memory will allocate for pointer when i compile and run the code
What's term " Memory allocation at run time " in code development?