Question
names is an integer array with 20 elements. Write a regular for loop, as well as a range-based for loop that prints each element of the array.
Step 1
You can initialize it with some integer values for demonstration purposes. For example: ```cpp int names[20] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; ``` Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD