<aside> <img src="/icons/home_green.svg" alt="/icons/home_green.svg" width="40px" />

Back to Home

</aside>

https://jennychen9827sbu.github.io/CAD281/array.html


What Is an Array in C?

Imagine a row of boxes. Each box stores a value. The whole row has one name — that’s an array. Each box also has a number label called an index so we can grab or update what's inside.

Let’s walk through this step by step.


Integer Array

int nums[4] = {10, 20, 30, 40};

This means:

So:

💡 In C, array indexing starts at 0, not 1.