front and back
easyQuestion 530An array<int, 3> named a has been created with the values {3, 5, 9}.
Print two lines: the word First:, a space and the first element, then the word Last:, a space and the last element. Use front() and back() rather than a[0] and a[2].
Expected output
First: 3 Last: 9
= newline. The output ends with a newline, so 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.