Question: What does the below code segment do if Pizza is entered (assume string.h is included)? What would happen if 1 was entered? char charUserWord[50] =

What does the below code segment do if Pizza is entered (assume string.h is included)? What would happen if 1 was entered? char charUserWord[50] = "a"; printf("Please enter a word (greater than one character): "); scanf("%s", charUserWord); if (strlen(charUserWord) > 1) { if (strcmp(charUserWord, "Great") == 0) { printf(" Great job!"); } else { printf(" You didn't guess the magic word"); } } else { printf("You didn't enter enough characters"); }

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!