DEV Community

Cover image for Arrays Basics
Romil Jain
Romil Jain

Posted on

2 1

Arrays Basics

In Arrays, we can store multiple items of the same type together.

int A[5]; → means that we have declared an array of size 5
when we count arrays we count from zero , so here count is represented by index.

count arrays

A[0]=14; → means we have stored 14 at index 0
A[1]=2; → means we have stored 2 at index 1

We can declare above array easily by using code blocks
int A[10]={3,5,6,7,8,9}; → this is called declaration + assigning the value

I would recommend you to study C language from GeekForGeeks and learn about structures

HINT :- To print all array values


for(int i=0;i<5;i++){
  printf("%d", A[i];
};

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay