Question: Create a function named findCharRange which takes two arguments; a string ( char array ) and pointer to a range _ t structure. This function

Create a function named findCharRange which takes two arguments; a string (char array) and pointer
to a range_t structure.
This function findCharRange should search through the string argument and find the letter closest to
the start of the alphabet and place a copy of that character in the structure as the value of the start
field. It should also place a copy of the character from the string that is closest to the end of the string
in the structure as the value of the end field.
This function should ignore case and should ignore any character that is not an alphabetic letter.
If the string contains no alphabetic characters, then the values for start and end should be 0.(Literal
zero, not ASCII zero.)
The string may contain any valid printable character. It wont just contain alphabetic characters.
The character may be any valid printable character.
The values stored in the range_t structure should ONLY be lower case letters regardless of the case of
the char found in the string.
For example,
range_t range;
char str[]="123+++TesTTesTTesT123";
findCharRange(str, &range);
printf("%c:%c
", range.start, range.end);
Should return with ranges start value as the character e and ranges end value as the character t
since the letter e is in the string and is the letter that is closest to the beginning of the alphabet and
the letter t is in the string and is the letter that is closest to the end of the alphabet. The output
would be:
e:t

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 Programming Questions!