n this practice you will first ask the user for their name. Then, print out “Hi [name], please ent restaurants!”. Then, read in the user’s ten favorite restaurants, store them in an array, and print...

n this practice you will first ask the user for their name. Then, print out “Hi [name], please ent restaurants!”. Then, read in the user’s ten favorite restaurants, store them in an array, and print them to the screen.In your main you will create a character array (c-string) and a string array. The user’s full name (including spaces) should be stored in the character array.You will then pass the string array to a function called getRestaurants. getRestaurants will take the string array as an argument and prompt the user for 10 restaurants and read them into the string array.displayArray will then be called from main and will print out the contents of the arra


CSC 1300 In-Class Practice Week 9 - Arrays Printing arrays Name your file week9.cpp. In this practice you will first ask the user for their name. Then, print out “Hi [name], please enter your favorite restaurants!”. Then, read in the user’s ten favorite restaurants, store them in an array, and print them to the screen. In your main you will create a character array (c-string) and a string array. The user’s full name (including spaces) should be stored in the character array. You will then pass the string array to a function called getRestaurants. getRestaurants will take the string array as an argument and prompt the user for 10 restaurants and read them into the string array. displayArray will then be called from main and will print out the contents of the array. Sample Output User input is highlighted in yellow. What is your name? April Crockett Hi April Crockett, please enter your favorite restaurants! Enter restaurant1: Mamma Rosas Enter restaurant2: Chilis Enter restaurant3: Blue Coast Burrito Enter restaurant4: El Tapatio Enter restaurant5: Spankys Restaurant Enter restaurant6: Ralphs Donuts Enter restaurant7: Pharaohs Grill Enter restaurant8: Persis Indian Grill Enter restaurant9: Papa Johns Enter restaurant10: Chick-fil-A ******************** Mamma Rosas Chilis Blue Coast Burrito El Tapatio Spankys Restaurant Ralphs Donuts Pharaohs Grill Persis Indian Grill Papa Johns Chick-fil-A
Oct 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here