Write a program that opens a text file and reads it

Assignment Help C/C++ Programming
Reference no: EM131839644

Problem

1. Write a program that opens a text file, reads it character-by-character to the end of the file, and reports the number of characters in the file.

2. Do Programming Exercise 6 but modify it to get information from a file. The first item in the file should be the number of contributors, and the rest of the file should consist of pairs of lines, with the first line of each pair being a contributor's name and the second line being a contribution.

Exercise 6

Put together a program that keeps track of monetary contributions to the Society for the Preservation of Rightful Influence. It should ask the user to enter the number of contributors and then solicit the user to enter the name and contribution of each contributor. The information should be stored in a dynamically allocated array of structures. Each structure should have two members: a character array (or else a string object) to store the name and a double member to hold the amount of the contribution. After reading all the data, the program should display the names and amounts donated for all donors who contributed $10,000 or more. This list should be headed by the label Grand Patrons. After that, the program should list the remaining donors. That list should be headed Patrons. If there are no donors in one of the categories, the program should print the word "none." Aside from displaying two categories, the program need do no sorting.

Reference no: EM131839644

Questions Cloud

What are the three steps in using a function : What are the three steps in using a function? Construct function prototypes that match following descriptions igor() takes no arguments and has no return value.
Describe the relationship of the leaders : Describe the relationship of the leaders, departments, and personnel within the organizational chart.
Implementing standardized terminologies within ehrs : Discuss the major local, national, and international obstacles to implementing standardized terminologies within EHRs.
Recommend an experimental drug that requires bone marrow : The Johnson's have 2 children. Both young boys. Adam is 6 and John is 3. Adam was diagnosed with Acute Leukemia 7 months ago.
Write a program that opens a text file and reads it : Write a program that opens a text file, reads it character-by-character to the end of the file, and reports the number of characters in the file.
How does an industry characterized as having economies : How does an industry characterized as having economies of scale effects serve as a barrier to entry?
Explain exactly what ivf is : Explain exactly what IVF is. Also, explain the advantages and disadvantages of IVF. Last, explain what role the health of the male reproductive system plays
Write a program that can list members by real name : Write a program that can list members by real name, by job title, by secret name, or by a member's preference.
How do the results of the analysis equate to strategy : What does one do with the information? In other words how do the results of the analysis equate to strategy?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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