Question: Write an interactive C program that lets a user play a game of Hangman. Please explain and justify the code, thanks so much! pUlnts: Write

Write an interactive C program that lets a user play a game of Hangman.
Please explain and justify the code, thanks so much!  Write an interactive C program that lets a user play a

pUlnts: Write an interactive C program that lets a user play a game of Hangman 1) Your program gets the secret word (7 letters in each word) by calling the given function: void get word(char word[]) ( char WORDJ8] -("program", "puzzles", "squeeze", "circuit", "devoted", "journey", "version", "totally", "respect" b int i, num; num (rand() % 9); for (i 0; i #include // enable use of rand() // enable use of time() and srand((int)time(0)); 3) Initially the program prints on the screen the number of letters of the word to be guessed. This is in the form of successive stars (see sample code execution on the next page) The player makes a guess on the letters belonging to the secret word one by one. At each step, the program prints on the screen the letters that have been guessed, and the number of wrong guesses. The program terminates when either a) all letters have been guessed correctly (the player wins) or b) 7 guesses have been made (the player loses). Your program must be modular. Create at least TWo meaningful functions that abstract details such as printing the word after a letter guess is attempted or searching for a letter within a word. Suggestion: Use another array, guessed, to keep track of the solution so far. Initialize all elements of guessed to the*' symbol. Each time a letter in word is guessed correctly, replace the corresponding"* in guessed with that letter

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!