Skip to content

Instantly share code, notes, and snippets.

@tmiz
Created March 8, 2011 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmiz/860011 to your computer and use it in GitHub Desktop.
Save tmiz/860011 to your computer and use it in GitHub Desktop.
C QUIZ 001_01
#include <stdio.h>
#define ELEMENTSNUM (sizeof(array) / sizeof(array[0]))
int array[] = {10,20,30,40,50,60,70};
int main()
{
int d;
for(d=-1;d <= (ELEMENTSNUM-2);d++)
printf("%d\n",array[d+1]);
return 0;
}
// Output is nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment