Arrays

This lesson will introduce you to arrays. You will learn how arrays are defined and how to access array elements. In addition, you will also get to know about how C implements arrays and what precautions we have to take while accessing array elements.

We'll cover the following

Just as in MATLAB, or Python, or any number of other high-level languages, C provides a data structure called an array. An array in C is a set of ordered items. You can think of this as a vector, a list, etc, there are many names. Typically in C we call these an array.

Defining an Array

As an example, let’s say we want to store a list of 5 grades. We can define an array as follows:

Create a free account to access the full course.

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