fork download
  1. #include<stdio.h>
  2.  
  3. #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
  4. int array[] = {23,34,12,17,204,99,16};
  5.  
  6. int main()
  7. {
  8. int d;
  9. printf("Total= %d\n", TOTAL_ELEMENTS);
  10. for(d=-1;d <= (int)((TOTAL_ELEMENTS)-2);d++) {
  11. printf("%d\n",array[d+1]);
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
Total= 7
23
34
12
17
204
99
16