Write a function hasBothCases that takes a a c-string and determines if it contains both the upper and lowercase forms of a letter, returning 11 if both the upper and lowercase form of a letter are part of the string and returning 00 if no such letter exists. For example, hasBothCases should return 11 for the strings "Nine", "Lowell", and "o_O", but should return 00 for "nine", "Massachusetts", and "zyBooks". HINTS: You can make use of either the following: (1) Assume that the library has already been #included. 2) Upper case letter A starts at 65 and Upper case Z is 90 in ASCII code, while lower case a starts at 97 and z is 122. NOTE: You only need to write the function. In C programming
Write a function hasBothCases that takes a a c-string and determines if it contains both the upper and lowercase forms of a letter, returning 11 if both the upper and lowercase form of a letter are part of the string and returning 00 if no such letter exists. For example, hasBothCases should return 11 for the strings "Nine", "Lowell", and "o_O", but should return 00 for "nine", "Massachusetts", and "zyBooks". HINTS: You can make use of either the following: (1) Assume that the <ctype.h> library has already been #included. 2) Upper case letter A starts at 65 and Upper case Z is 90 in ASCII code, while lower case a starts at 97 and z is 122. NOTE: You only need to write the function.
In C programming
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images