Question: Declare a string array of size 5. Use a loop to store five fruits in the array that are entered by the user. Then find

Declare a string array of size 5. Use a loop to store five fruits in the array that are entered by the user. Then find the longest string in the array and output it. Hint: Use .length() on a string variable to determine the number of chars in a string. Sample Run: Fruit 1: banana Fruit 2: apple Fruit 3: lemon Fruit 4: pears Fruit 5: orange Longest: banana

can anyone answer this in c++

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