Question: 2. (20 points) Given the following arrays Sample output int age [5]={33,67,55,72,44}; string names[4 ]=[Trump, Clinton, Obama, Biden } write a program to do the
2. (20 points) Given the following arrays Sample output int age [5]={33,67,55,72,44}; string names[4 ]=["Trump", "Clinton", "Obama", "Biden"" } write a program to do the following Alby age: 67557244 a. call a function template displayAll to display each Array names: Irump Clinton Obama Biden array. displayAll(age, 5); Vector vAge: 67557244 displayAll( names, 3); Vector yNames: Trump Clinton Obama Biden Age average =54.20 b. Copy array age into vector vAse, and array names into vector viames. c. call function Displayall to display each vector DisplayAll(vage ); Displavall(vinames ); d. Call function comeuteAgeAve to compute and return their age average. Display the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
