Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use stdio.h And also add comments explaining your code Make sure program ends after 4 attempts Also make sure that the word isnt specific. The

image text in transcribed
Use stdio.h
And also add comments explaining your code
Make sure program ends after 4 attempts
Also make sure that the word isnt specific. The word changes in each test or run
hdow Help hw6.pdf (page 2 of 2) 177% CO, Tue 10:43 PM a 0E 4 Hangman (20 points) Write an interactive program that plays a game of hangman. Store the characters of the word to be guessed in a array of type char (you can initialize your character array at declaration). Words are seven letters long, Initially, the programdisplays the length of he word to be guese si f stars (see The player guesses letters belonging to the secret word one by one. After each guess, the letters that have been guessed and the number of wrong guesses are displayed on screen. Your program should terminate when either the entire word is guessed or 4 incorrect guesses have been attempted. Your program must be modular. Create at least two meaningful functions that abstract details such as printing the word state after a letter guess is attempted or searching for a letter within a word. Test your program for the words: abandon, annoyed, finance, aerobic, inferno, infancy. Sample execution for word abandon: Hi, let's play hangman. The secret vord is: Guess a letter:t Letter t is not part of the secret word, You have 3 attempts left. Guess a letter:a Letter a exists 2 times in the secret word, You have 3 attempts left. Guess a letter:e Letter e is not part of the secret word, you have 2 attempts lett. For this problem, submit your pseudocode Submit your c files named hw6.pl.c, hw6 p2.c, hw6.p3.c, and hw6.p3.c via D2L dropbox

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data With Hadoop MapReduce A Classroom Approach

Authors: Rathinaraja Jeyaraj ,Ganeshkumar Pugalendhi ,Anand Paul

1st Edition

1774634848, 978-1774634844

More Books

Students also viewed these Databases questions

Question

Influences on Nonverbal Communication?

Answered: 1 week ago