Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students explore these related Databases questions

Question

What is the preferred personality?

Answered: 3 weeks ago

Question

What is the relationship between humans?

Answered: 3 weeks ago