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

  Examine the boxplot

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

  Write a paper on memory management

Write a paper on Memory Management

  Accuracy and completeness of computations

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

  Create a multi-threaded competition

Create a multi-threaded competition in which opposing Robin Hoods will attack one another and try to take each other's gold coins.

  Communicate with a pc using the rs232c serial protocol

In this assignment we will use the UART0 peripheral to communicate with a PC using the RS232C serial protocol.

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Write a program using binary search approach

Write a program using binary search approach

  Program to perform a search of an employee list

Write a /bash/bin program to perform a search of an employee list.

  Build a student record managing system application

Build a student record managing system application

  Build a student record managing system application

Build a student record managing system application

  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.

  Technical project: sample website project

Technical Project: Sample Website Project , This assignment consists of three (3) sections: a narrative, a storyboard, and a business Website. You must submit all three (3) sections for the completion of this assignment.

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