In: Computer Science
C programming
Illustrate the stack and the heap allocation. Specify what
each variable value holds and where different references are
pointing to.
int main()
{
char str[20];
scanf("%[^\n]%*c", str);
//illustrate how memory is allocated at this point
printf("%s", str);
return 0;
}