

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Some concept of Computers and Programming I are Assign Value, Single-Subscripted Array, Class Members, Current Precision, Elementary School, Complete Program, Fibonacci Sequence, Programming Errors. Main points of this homework are: Statement, Applies, Program, Company Pays , Per Week, Gross, Sales, Commission Basis, Salespeople, Earned
Typology: Lecture notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Question 1 Assume that the following statement applies to a program. Write a statement that opens file “ oldmast.dat ” for input; use ifstream object inOldMaster.
Question 2 Assume that the following statement applies to a program. Write a statement that opens file “ trans.dat ” for input; use ifstream object inTransaction.
Question 3 Assume that the following statement applies to a program. Write a statement that opens file “ newmast.dat ” for output; use ofstream object outNewMaster.
Question 4 Assume that the following statement applies to a program.
Write a statement that reads a record from the file “ oldmast.dat ”. The record consists of integer accountNum , string name and floating-point currentBalance ; use ifstream object inOldMaster..
Question 5 Assume that the following statement applies to a program. Write a statement that reads a record from the file “ trans.dat ”. The record consists of integer accountNum , floating-point dollarAmount ; use ifstream object inTransaction.
Question 6 Assume that the following statement applies to a program. Write a statement that writes a record to the file “ newmast.dat ”. The record consists of integer accountNum , string name , and floating-point currentBalance ; use ofstream object outNewMaster.
Question 7
Write a program that uses the sizeof operator to determine the sizes in bytes of the various data types on your computer systems. Write the results to the file “ datasize.dat ” so you may print the results later. The format for the results in the file should be
Date type Size