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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!