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.

A[0]=14; → means we have stored 14 at inde…


This content originally appeared on DEV Community and was authored by Romil Jain

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];
};


This content originally appeared on DEV Community and was authored by Romil Jain


Print Share Comment Cite Upload Translate Updates
APA

Romil Jain | Sciencx (2021-11-06T16:34:15+00:00) Arrays Basics. Retrieved from https://www.scien.cx/2021/11/06/arrays-basics/

MLA
" » Arrays Basics." Romil Jain | Sciencx - Saturday November 6, 2021, https://www.scien.cx/2021/11/06/arrays-basics/
HARVARD
Romil Jain | Sciencx Saturday November 6, 2021 » Arrays Basics., viewed ,<https://www.scien.cx/2021/11/06/arrays-basics/>
VANCOUVER
Romil Jain | Sciencx - » Arrays Basics. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/06/arrays-basics/
CHICAGO
" » Arrays Basics." Romil Jain | Sciencx - Accessed . https://www.scien.cx/2021/11/06/arrays-basics/
IEEE
" » Arrays Basics." Romil Jain | Sciencx [Online]. Available: https://www.scien.cx/2021/11/06/arrays-basics/. [Accessed: ]
rf:citation
» Arrays Basics | Romil Jain | Sciencx | https://www.scien.cx/2021/11/06/arrays-basics/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.