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.
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
Romil Jain | Sciencx (2021-11-06T16:34:15+00:00) Arrays Basics. Retrieved from 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.