CJCoding With Joseph
15free / daySign inCreate account

An array called nums has already been created for you with the values {10, 20, 30, 40, 50}.

Your task is to print the last element of the array.

Since this array has 5 elements and arrays start at index 0, the last element is at index 4. In general, the last index of an array is always its size minus 1.

Expected output

50

= newline. No newline after the last line.

Hints2 available
Topics
Arrays
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.