004-001-010

Declaring and Creating Arrays

Easy

Problem Description

Declaring and Creating Arrays

Learning Objective: Understand how to declare array variables and create array objects

Overview

Declare and create an integer array, assign values to elements, and output them.

Specifications

  • Declare and create an integer array with 5 elements
  • Assign 10, 20, 30, 40, 50 to each element
  • Output all elements

Output Format

Element 0: 10
Element 1: 20
Element 2: 30
Element 3: 40
Element 4: 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?