Skip to content

Commit 3c6a4eb

Browse files
authored
Update Array.md
1 parent 4fd8a1c commit 3c6a4eb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Array.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,14 @@ This operation is to traverse through the elements of an array.
7070
Following program traverses and prints the elements of an array:
7171
7272
```c
73-
73+
#include<stdio.h>
74+
75+
int main()
76+
{
77+
int array[5] = {2, 6, 8, 3, 9};
78+
int i = 0;
79+
for (i >= 0; i < 5; i++){
80+
printf("array[%d] = %d \n", i, array[i]);
81+
}
82+
}
7483
```

0 commit comments

Comments
 (0)