Question: Please implement a C++ program which tries to find the longest common prefix string amongst three strings. If there is no common prefix, please output

Please implement a C++ program which tries to find the longest common prefix string amongst three strings. If there is no common prefix, please output "There is no common prefix". Your program needs to read the three strings via command line arguments. Example 1: str1 = "flower", str2 = "flow", str 3= "flight" Output: "fl" Example 2: str 1= "dog", str2 = "racecar", str 3= "car" Output: "There is no common prefix" Explanation: There is no common prefix among the input strings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
