Question: Enter the return of the below function when it's called as f_array3('c',c_array) when char c_array[10] = {'e','A','c','a','c','B','b','A','E','c'} . int f_array3(char n,char a[]) { int i;
Enter the return of the below function when it's called as f_array3('c',c_array)when char c_array[10] = {'e','A','c','a','c','B','b','A','E','c'}.
int f_array3(char n,char a[]) { int i; char *ptr; ptr = a;
for(i=1;i<10;i++) { if(n==a[i]) { return &a[i]-ptr; } } return &a[i]-ptr;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
