Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started