Question: 1 . ) Declaring / initializing arrays Download partner.cpp . Currently, there are two name variables ( fullName 1 and fullName 2 ) and two

1.) Declaring/initializing arrays
Download partner.cpp. Currently, there are two name variables (fullName1 and fullName2) and two height variables (height1 and height2). Revise the main() function to use an array for each pair of variables (one array for all names and another array for all heights). The output should look exactly the same from the perspective of someone running the program.
2.) Passing arrays to functions
Make a copy of your code from Warm-up 1 to a new file as a starting point for this problem. In main(), there is a cout statement. Make a new function that displays the same information as this cout and replace the code in main() with a call to the new function. (Hint: Cut and paste the cout statement into a function and pass the correct arguments.)
3.) Partially-filled arrays
Copy your code from Warm-up 2 into a new file as a starting point for this problem. Modify your main() function to allow any number of names and heights to be entered (instead of just 2). You can assume that there will not be more than 100 people. (Hint: You can declare arrays that are big enough to hold all the names and heights in any case and only partially fill the arrays when fewer than 100 entries are needed.)

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!