โ Back to Arrays
Question 93
Print Third Element
Print Third Element
An array called nums has already been created for you with the values {10, 20, 30, 40, 50}.
Your task is to print the third element of the array.
Remember that arrays in C++ are zero-indexed:
- Index 0 = first element (10)
- Index 1 = second element (20)
- Index 2 = third element (30)
So the "third" element is actually at index 2, not index 3.
Expected output:
30Expected Output:
30
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.