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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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