Question: Write a program in C that takes in at most 1 0 fruit names Each of the strings must hold up to a maximum of
Write a program in C that takes in at most fruit names
Each of the strings must hold up to a maximum of characters excluding newline characters
from character calculation
The program will keep asking the user to enter strings until either the user enters "STOP" or when
the user has entered strings
The program will then print the string with the longest and shortest length
The program will also find if a fruit name is a substring of any other fruit
Eg "apple" is a substring of "pineapple"
If they exists, print both the string and the substring
This is case sensitive so "Apple" is not a substring of "Pineapple"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
