Consider the following program:-
int a=5;
printf(&a);//print address of a
int b=malloc();
printf(&b); //print address of b
Will it print logical address in both cases?If yes,then does it mean that variables are created on secondary memory and then copied to man memory when required?I was under impression that this memory allocation happens in main meory.Please clarify.