ummmm, fixed?

cat-town
Dan Buch 14 years ago
parent 81f7260e3f
commit 7f11279bfd

@ -0,0 +1,9 @@
DEBUG :=
export DEBUG
all:
cd gowrikumar && $(MAKE)
.PHONY: all

@ -1,18 +1,20 @@
/**
* :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 array[] = {23, 34, 12, 17, 204, 99, 16};
#define TOTAL_ELEMENTS sizeof(array) / sizeof(array[0])
int main()
{
int d;
for(d=-1;d <= (TOTAL_ELEMENTS-2);d++)
printf("%d\n",array[d+1]);
#ifdef DEBUG
printf("sizeof(array) = %d\n", TOTAL_ELEMENTS);
#endif
for (d = 0; d < TOTAL_ELEMENTS ; d++)
printf("%d\n", array[d]);
return 0;
}

@ -3,4 +3,8 @@
all: 00-sizeof
00-sizeof: 00-sizeof.o
.PHONY: all

Loading…
Cancel
Save