Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created November 4, 2015 12:06
Show Gist options
  • Select an option

  • Save KristianLyng/29b8efc3cf71c5a76fbe to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/29b8efc3cf71c5a76fbe to your computer and use it in GitHub Desktop.
#include <stdio.h>
#define peval(f,s) do { \
printf("%s: " f "\n", #s, (s)); \
} while(0);
int main() {
peval("%zu", sizeof(size_t));
peval("%zu", sizeof(long));
peval("%zu", sizeof(int));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment