Question: Program 2 - Arrays and Functions ( lab 6 - 2 . cpp ) Write a program that does the following: 1 . Define and

Program 2- Arrays and Functions (lab6-2.cpp) Write a program that does the following:
1. Define and use the following three functions:
a. string genFirstName()
b. string genLastName()
c. void printNames(int count)
2. genFirstName will contain an array of at least 10 first names and randomly return one of the names.
3. genLastName will contain an array of at least 10 last names and randomly return one of the names.
4. printNames will use a for loop to print out names using genFirstName() and genLastName()
5. The main function will only do two things: seed rand() and call printNames(10);

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!