Question: Write a program that reads 3 strings then finds out the length of each string and whether the length is odd. Then it should print

Write a program that reads 3 strings then finds out the length of each string and whether the length is odd. Then it should print out the strings of odd length. The program should have the following functions: int length(chars[]) calculates and returns the length of the strings. (i.e. how many characters does the string have) int main() declares and reads 3 strings from the user. Then it calls the length function 3 times to find the length of each one of them. Then it should print out only the strings that have an odd length. Note the output screen below: C:\cygwin\bin\sh.exe enter three strings: abc abcd abcdefghi the strings that have odd length are: abc 3 abcdefghi 9 Press [Enter] to close the terminal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
