Suppose I have a function like this:
int *calculator(int *pointer1, int *pointer2) {
int *pointer3 = malloc(15);
return pointer3; //not an actual return, just an example function
}
and then in main, I have multiple calls to it:
int main(void) {
int array[40];
int *ptr, *ptr2, *ptr3, *ptr4;
ptr = ptr2 = ptr3 = ptr4 = array; // please don't mind this, i don't actually write code this way.
int *answer = calculator(calculator(ptr, ptr2), calculator(ptr3,calculator(ptr4, ptr5));
free(answer);
return 0;
}
Is the order of function calls from right to left? Will the last call to calculator(ptr4, ptr5)
be the first function to be calculated and returned?