Skip to content

Instantly share code, notes, and snippets.

@royratcliffe
Created October 28, 2011 09:24
Show Gist options
  • Save royratcliffe/1321947 to your computer and use it in GitHub Desktop.
Save royratcliffe/1321947 to your computer and use it in GitHub Desktop.
DIMOF C preprocessor macro
#define DIMOF(array) (sizeof(array)/sizeof((array)[0]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment