How to use C program to write the following code Write a fun

How to use C program to write the following code

Write a function whose sole argument is a C string. The function returns the address of the letter in the string which would appear last in the alphabet. You may use any function in , but do not use any functions in .

Solution

char* address(char arr[], int size){
int max = 0, i;
for(i = 1; i < size; i++){
if(arr[max] < arr[i]) max = i;
}
return &arr[max];
}

How to use C program to write the following code Write a function whose sole argument is a C string. The function returns the address of the letter in the strin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site