Question: c program char str 1 [ 7 5 ] ; char str 2 [ 7 5 ] ; / / reading two phrases as input
c program char str;
char str;
reading two phrases as input from the user
getsstr;
getsstr;
check if both the strigs are equal
ifstrcmpstrstr
printfBoth phrases match";
else ifstrstrstrstr
check if str is the substring of str
printfPhrase one is found within phrase two";
else ifstrstrstrstr
check if str is the substring of str
printfPhase two is found within phrase one";
else
When none of the above cases is true
printfNo matches";
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
