box-o-sand/gowrikumar/00-sizeof.c
2011-06-12 22:36:31 -04:00

22 lines
333 B
C

/**
* :author: Dan Buch (daniel.buch@gmail.com)
*/
#include <stdio.h>
#define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0]))
int array[] = {23,34,12,17,204,99,16};
int main()
{
int d;
for(d=-1;d <= (TOTAL_ELEMENTS-2);d++)
printf("%d\n",array[d+1]);
return 0;
}
/* vim:filetype=c:fileencoding=utf-8
*/