doing some puzzles!
This commit is contained in:
commit
7b8c5e3212
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
gowrikumar/*
|
21
gowrikumar/00-sizeof.c
Normal file
21
gowrikumar/00-sizeof.c
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* :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
|
||||
*/
|
3
gowrikumar/Makefile
Normal file
3
gowrikumar/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
all: 00-sizeof
|
||||
|
||||
00-sizeof: 00-sizeof.o
|
Loading…
Reference in New Issue
Block a user