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

  Complete a request for system services

Objectives Complete a Request for System Services form, which triggers the preliminary investigation phase. Analyze a user interview and extract pertinent facts, which can be used to assess project feasibility. Complete a Problem Stateme..

  Javascript for metric conversions

Write a javascript that will assist the user with metric conversions. Your program should allow the user to specify the names of the units as strings.

  Write a vhdl code for soda vending machine

Write a VHDL code that implements the above soda machine. You have to turn in the following: A state diagram showing the implementation of your design. Clearly show all the states and the conditions on which transitions occur.

  Travelling salesman problem

Travelling Salesman Problem on the L1-metric plane.

  Questions on programing problem with the process of analysis

Questions on Programing Problem with the process of analysis and reflection that went on as you developed the project.

  Write a program that will generate an array

Write a program that will generate an array

  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

  Produce a project plan

Produce a project plan and an interim description of the project development

  Hubspot: inbound marketing and web 2.0

Hubspot: Inbound Marketing and Web 2.0

  Application development and programming languages

Compare and contrast object-oriented languages (Java, C++, C#, etc.) to imperative languages (C, Pascal, etc.) in terms of:

  Development of the current strategic potential of airline

Evaluate the organisation's current external and internal strategic position

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