---
# System prepended metadata

title: Array

---

# Array

A continuous memory with specificed size , can be called by index .
* **Type**
    can be assign as any type , ex : char , int  , float
* **Declare / Call**
```clike
int a[3] = {0,0,0} ;
a[0] = 0 ;
```
* **Order of index**
    count by 0 ~ n-1 , ex：
```clike
int a[3] ;
a[0] = 1 ;
a[1] = 1 ;
a[2] = 1 ;
```

* **Code Example**
```clike=
#include <stdio.h>

int main()
{
	int a[3] = {1,2,3} ;
	printf("a[0] is %d\n",a[0] );
	printf("a[1] is %d\n",a[1] );
	printf("a[2] is %d\n",a[2] );
	return 0;
}
```
Execution
```clike
$ gcc example.c -o example
$ ./example
```

Result 
```clike
a[0] is 1
a[1] is 2
a[2] is 3

```