Question: Consider the following code and select the correct output. #include #include int main(void) { char str1[] = Jake; char str2[] = Fred; char str3[] =

Consider the following code and select the correct output.

#include

#include

int main(void)

{

char str1[] = "Jake";

char str2[] = "Fred";

char str3[] = "Mary";

strcpy(str1, str2);

if (strcmp(str1, str2))

{

printf("Yes ");

}

else if (strcmp(str2, str1))

{

printf("YesYes ");

}

else if (strcmp(str3, "Mary"))

{

printf("Maybe ");

}

else if (strcmp(str1, str3))

{

printf("No ");

}

else

{

printf("NoNo ");

}

return 0;

}

A.YesYes

B.NoNo

C.Maybe

D.Yes

E.No

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