Skip to content

Instantly share code, notes, and snippets.

@lvidarte
Created October 12, 2012 16:05
Show Gist options
  • Save lvidarte/3879960 to your computer and use it in GitHub Desktop.
Save lvidarte/3879960 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(int argc, char const **argv)
{
int list[10] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
for (int i = 0; i < (sizeof(list) / sizeof(int)); i++) {
printf("%d\n", list[i]);
}
printf("size: %d\n", sizeof(list) / sizeof(int));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment