Answers for "loop array of 10 items in c"

C
8

array loop in c

int i, array[5]= {1, 2, 3, 4, 5};
for(i=0 ; i<5 ; i++)
{
	printf("%d", array[i]) ;
}
Posted by: Guest on July-10-2020
1

looping through an array in C

#include <stdio.h>
main() {
   int LA[] = {1,3,5,7,8};
   int item = 10, k = 3, n = 5;
   int i = 0, j = n;   
   printf("The original array elements are :\n");
   for(i = 0; i<n; i++) {
      printf("LA[%d] = %d \n", i, LA[i]);
   }
}
Posted by: Guest on April-21-2022

Code answers related to "loop array of 10 items in c"

Code answers related to "C"

Browse Popular Code Answers by Language