#include<stdio.h>
int add(int x,int y)
{
int z = 0;
z=x+y;
return z;
}
int main()
{
int a=10;
int b=20;
printf("%d\n",add(a,b));
return 0;
int add(int x,int y)
{
int z = 0;
z=x+y;
return z;
}
int main()
{
int a=10;
int b=20;
printf("%d\n",add(a,b));
return 0;
}
The stack of the main function main() is shown in the figure
The stack of the add function is shown in Figure 2.