Program that reads letters from a file called"inputlet.txt"

Assignment Help Computer Engineering
Reference no: EM1331365

Using only C (not c++) design the program described

General Requirements
? Write a program that reads letters from a file called"inputLet.txt".
? Your program will ask the user to enter the number of games they wish to play (1 to 4)
? This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
? the test file will contain at least 15 letters, all lowercase
? When the number of games has been played, the program will end

? A preprocessor directive must be used to define the maximum number of guesses as 5
? If the player has used up all of their guesses, a message that the game is over should be displayed along with the letter they were trying to guess.
? You must have at least 4 user defined functions as follows:

//this function provides instructions to the user on how to play the game
void Instructions( );

//this function runs one game. It for checks either 5 incorrect guesses or correct guess.
//It returns a 0 if the game is over and the player did not guess the letter, otherwise it returns 1.

int PlayGuess(char solution);

//this function prompts the player to make a guess and returns that guess
//this function is called from inside the PlayGuess( ) function described above
char GetLetter( );

//this function takes two arguments, the guess from the player
//and the solution letter from the file.
//It lets the user know if the guess comes alphabetically before or after the answer
//The function returns 1 if the guess matches the solution and returns a 0 if they do not match
int CompareLetters(char guess, char solution);

Additional Requirements:
? Use function prototypes.
? Write comments for each function that will appear in the file before each prototype and again before each function definition.
? Be sure to comment your code adequately.
? Be sure to indent properly.
? Use meaningful variable names

Reference no: EM1331365

Questions Cloud

Prepare a presentation about competency-based hr programs : Prepare a presentation and a briefing paper about competency-based HR programs - How will such an approach strategically align the HR organization and facilitate the effective implementation of Stentor's business strategy
Program computes and prints the 1000th prime number : Write down a program that computes and prints the 1000th prime number using code blocks c++
Explain trends for security on the internet : What are the ebusiness trends for security on the internet? Research on internet viruses, trends in security software for the internet, and security features for online businesses.
Preventing employee fraud : Preventing Employee Fraud - Do you know what types of cash collecting procedures your company uses to safeguard against fraud?
Program that reads letters from a file called"inputlet.txt" : This program must open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
Write financial information and report : Please include, as a second attachment, your Excel workbook that includes all of your work for ratios, trends analyses, and other assessment tools that you use.
Determine the characteristics of the new workplace : Conceptual, Human, and Technical Strengths - Determine the characteristics of the new workplace
Discussing the elements of an organizational culture : Discuss the elements of an organizational culture.
Explain example of what is brick and mortar : How can analyze the supply chain for the businesses in a "brick and mortar" environment? Explain how the supply chain was modified from "brick and mortar" by the web site.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Make java applet that displays the 13 standard colors

Write down an Java Applet that displays the 13 standard colors available in Java (back, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white and yellow) in a set of 13 filled rectangles.

  The address assigned to one device is 7ca416

The address bus of a computer has 16 address lines, A15_0 If the address assigned to one device is 7CA416 and the address decoder for that device ignores lines A8 and A9, what are all the addresses to that the device will respond.

  Designing the dfd

Construct a context diagram for the new system. Construct a diagram 0 DFD for the new system.

  How many bits are needed to address

How various bits are required to address a 1M × 8 main memory if Main memory is byte-addressable.

  Evaluates and contrast tcp and ud

Describe the need for the Transport Layer. Recognize the role of the Transport Layer as it provides the end to end transfer of data between applications.

  Transfering the power over ethernet

A recent article in an industry magazine discussed the ability to transfer the Power over Ethernet (PoE) and an emerging technology which is able to transfer the Power over Fiber (PoF).

  Implementing the code

Write down a program which uses a structure named CorpData in order to store the following information about a company division: Involve a constructor that enables the division name and four quarterly sales amounts to be specified at the time a Cor..

  Find whether the year entered from the keyboard

create a C program to determine whether the year entered from the keyboard is a leap year. Display a message indicating whether the year is or is not a leap year.

  Prolog as programming language for logic

Utilizing the Prolog as the programming language for the LOGIC, form the relevant command in order to perform the following tasks. Prolog Lists - A list is either empty or it comprises of the first element (head) and a tail, which is a list itself.

  Write down an sql statement

Write down an SQL statement

  Produce the context diagram for system

Produce the context diagram for system.

  Knowledge revolution and industrial revolution

What are your thought on this that would support notion that Knowledge Revolution was born from the Industrial Revolution?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd