I was just looking into the memory allocation of a program in C. I know that all the global and static variables are stored in a heap. Also, the stack stores all the function calls. I do have one doubt here though. Say I am calling the following function:
int ret;
int num = 10;
int arr[3] = {1,2,3};
int *ptr = &arr[0];
ret = giveNumber(num, ptr);
Here, I read that the parameters of the function call giveNumer() would also be stored in the same stack. But in what order will they be stored? If I popped the top of stack, which parameter will be popped first, num or ptr?