Question: Write a C + + program to read the contents of a data file and load it into two parallel arrays: AryName ( 1 -

Write a C++ program to read the contents of a data file and load it into two parallel arrays: AryName (1-D) and
AryQuantity (2-D). The file contains names of animals and how many females and males of each animal type the zoo
possesses, one per line, in no specific order. Define MAX_ROWS and MAX_COLUMNS global constants and set them
to 20 and 2, respectively. You can assume the file will have fewer than 20 animals, but keep track when you read the data
file to know how many exactly. Use these constants in array declarations and in code when checking whether the arrays
are completely filled with data.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!