Question: 1 . ) Declaring / initializing arrays Download partner.cpp . Currently, there are two name variables ( fullName 1 and fullName 2 ) and two
Declaringinitializing arrays
Download partner.cpp Currently, there are two name variables fullName and fullName and two height variables height and height 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.
Passing arrays to functions
Make a copy of your code from Warmup 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.
Partiallyfilled arrays
Copy your code from Warmup 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 You can assume that there will not be more than 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 entries are needed.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
