CJCoding With Joseph
15per day

Print Last 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 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

Expected Output:

50
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.