004-003-010
Accessing Array Elements
Easy
Problem Description
Accessing array Elements
In this problem, you will create a program that creates an integer array and displays the elements at indices 0, 2, and 4 with labels to standard output.
Learning Objective: Understand how to access array elements using indices
Overview
Access array elements using indices and output values at specific positions.
Specifications
- Create an integer array {10, 20, 30, 40, 50}
- Output the element at index 0 (first element)
- Output the element at index 2 (third element)
- Output the element at index 4 (last element)
Output Format
First: 10
Third: 30
Last: 50
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up