Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5. int i;
  6.  
  7. printf("size: %lu\n", sizeof(*(1 ? (void*)(i * 0ul) : (int*)1)));
  8. printf("size: %lu\n", sizeof(*(1 ? (void*)(5 * 0ul) : (int*)1)));
  9. }
  10.  
  11. /*
  12. $ gcc -Wall const.c && ./a.out
  13. size: 1
  14. size: 4
  15. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement