Array Initialization and Updating Array Elements

You will learn how to assign values to array elements after an array has been declared. You can also populate an array while it is initialized.

Assigning values to array elements

I can assign the integers 1 through 5 to my grades array like this:

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy