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 haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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