← Back to STL Containers
Question 533
Array of Strings With Index
Array of Strings With Index
Anarray<string, 3>nameddayshas been created with the values {"Mon", "Tue", "Wed"} and a loop overifrom 0 to 2 is already written. Inside the loop, print the indexi, a colon, a space, and the day name at that index, then a newline.
Expected Output:
0: Mon 1: Tue 2: Wed
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
STL Containersstd::array
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.