Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HangMan (C Code / Arrays only / NO STRINGS!) Write an interactive program that plays a game of hangman. Store the characters of the word

HangMan (C Code / Arrays only / NO STRINGS!)

Write an interactive program that plays a game of hangman. Store the characters of the word to be guessed in an array of type char (you can initialize your character array at declaration). Words are seven letters long. Initially, the program displays the length of the word to be guessed. This is in the form of successive stars (see example). 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

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions