ummmm, fixed?

This commit is contained in:
Dan Buch 2011-06-12 23:02:18 -04:00
parent 81f7260e3f
commit 7f11279bfd
3 changed files with 23 additions and 8 deletions

9
Makefile Normal file
View File

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

View File

@ -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};
#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;
}

View File

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