I have included the answer (provided by my professor) below.However, i don’t really understand. Please explain to me! Thankyou.
Given the C++ function prototype and variable declarations:
int func(int arg0, int *arg1, int arg2);
int *ptr, n, arr[10];
which of the following statements will cause syntax errors orwarnings about type mismatch/missing cast? For each case, writeeither BAD (error or warning), or OK (no error or warning), andcircle also *all* the argument/variables that have type mismatches.No points will be awarded for a statement if there is a syntaxerror and you circle the wrong argument/variable.
The answer is:
ptr[n] = func(arr[0], &arr[n], n); OK
*ptr = func(arr[*ptr], &n, ptr);
PayPal Gateway not configured
PayPal Gateway not configured