Question: Write a function that, given two strings, identifies if the two strings have a common prefix. For example, the words autopilot and autobiography have a

Write a function that, given two strings, identifies if the two strings have a common prefix. For example, the words autopilot and autobiography have a common prefix which is auto. The functions should be like follows: void prefix(char s1[], char s2[], char commonPrefix[]) Write a main program that that uses this function after asking from the user two strings. If there is no common prefix, the program should print the appropriate message.

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!