C Examples Output Array
# C Language Example - Output Array
[ C Language Example](#)
Output array using a for loop:
## Example
#includeint main(){int array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; int loop; for(loop = 0; loop<10; loop++)printf("%d ", array); return 0; }
The output is:
1 2 3 4 5 6 7 8 9 0
Output array in reverse using a for loop:
## Example
#includeint main(){int array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; int loop; for(loop = 9; loop>= 0; loop--)printf("%d ", array); return 0; }
The output is:
0 9 8 7 6 5 4 3 2 1
[ C Language Example](#)
YouTip