A bank’s customer records are to be stored in a file and read into a set of arrays so that a customer’s record can be accessed randomly by account number. Create the file by entering five customer records, with each record consisting of an integer account number (starting with account number 1000), a first name (maximum of 10 characters), a last name (maximum of 15 characters), and a double-precision number for the account balance. After the file is created, write a C++ program that requests a user-input account number and displays the corresponding name and account balance from the file. (Hint: Read the data in the file into an array, and then search the array for the account number.)
A bank’s customer records are to be stored in a file and read into a set of arrays so
that a customer’s record can be accessed randomly by account number. Create the file by
entering five customer records, with each record consisting of an integer account number
(starting with account number 1000), a first name (maximum of 10 characters), a last name
(maximum of 15 characters), and a double-precision number for the account balance.
After the file is created, write a C++ program that requests a user-input account number and
displays the corresponding name and account balance from the file. (Hint: Read the data in the
file into an array, and then search the array for the account number.)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images