Program to write variable declarations and function calls

Assignment Help Programming Languages
Reference no: EM1344290

Q1) Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts, as explained below in the function printResult. (There can be no global variables! All information must be passed in and out of the functions. Use a structure to store the information.)
Your program must consist of at least the following functions:

i) Function openFile: Opens the input and output files. You must pass the file streams as parameters (by reference, of course). If the file does not exist, the program should print an appropriate message and exit. The program must ask the user for the names of the input and output files.

ii) Function count: Counts every occurrence of capital letters A-Z and small letters a-z in the text file opened in the function openFile. This information must go into an array of structures. The array must be passed as a parameter, and the file identifier must also be passed as a parameter.

iii) Function printResult: Prints the number of capital letters and small letters, as well as the percentage of capital letters for every letter A-Z and the percentage of small letters for every letter a-z. The percentages should look like this: ''25%''. This information must come from an array of structures, and this array must be passed as a parameter.

Reference no: EM1344290

Questions Cloud

Illustrate what is the real gdp in every year : illustrate what is the real GDP in every yr, given which the price index has risen from 100 to 104.5 in the 1st yr also up to 108.3 in the 2nd yr.
Convertible debt-project evaluation and bankruptcy : What are the benefits and costs of placing the financially troubled company Bankruptcy proceeding? Is this a legitimate and ethical vehicle for management to employ for the benefit of company's stakeholders?
Explain tradesperson action is typical of corporation trades : Jefferson Smurfit Company is a multibillion-dollar supplier of packaging materials. The tradesperson's action is typical of the corporation's trades philosophy
Asian financial crisis of 1997-98 : The Asian financial crisis of 1997-98 started with devaluation of the Thai baht in July 1997 and was followed by financial panic that spread to  Indonesia, Malaysia, the Philipines & South Korea
Program to write variable declarations and function calls : Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts.
Strategic financial tool-bankruptcy : Write down the ethical implications of corporations such as United Airlines and General Motors which utilize bankruptcy as a strategic financial tool to minimize their pension and health benefit obligations?
Question-business law and management ethics : Why should the definition of law emphasize enforcement? To what three factors do courts look for evidence of implied partnership?
Question based on u.s. economy : During times of financial crisis and economic downturn, recommend best course of action the Federal Reserve can take to minimize the  negative  impact to the United State economy.
Illustrate what are the factors which involve demand : Illustrate what are the factors which involve the provide also demand of which good or service. How do you expect the demand also provide of which good or service to change in the next yr.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a program using binary search approach

Write a program using binary search approach

  Write the constructor function makestk

Write the constructor function makestk, predicate function emptystk and mutator functions pushstk and popstk

  Using the irvine32 library functions

Create 32 random points which have (x, y) co-ordinates

  Examine the boxplot

Examine the boxplot and briefly discuss the overall pattern of electricity usage for the households.

  Accuracy and completeness of computations

Analysis right and you have to develop a plausible argument to "prove" that your analysis is correct

  Write a paper on memory management

Write a paper on Memory Management

  Create a simple shell

Create a simple shell. Basically your shell should read the line from standard input, parse the line with command and arguments, and operate the command with arguments.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Explain about lexical analyzer

Explain about Lexical Analyzer

  Html/css

"Validating Your Work" Please respond to the following:  Describe attribute minimization. Explain what would happen if you tried to validate a page containing instances of attribute minimization. Propose a solution to this problem.

  Use of various bash commands

Assignment On: This work will require scripting the use of various bash commands and / or small programs that involve directory and file structures.

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