Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 27th, 2011  |  syntax: None  |  size: 0.29 KB  |  views: 113  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <string.h>
  2. #include <stdio.h>
  3.  
  4. void my_func(char buf[25])
  5. {
  6.     printf("Sizeof(1): %d\n", sizeof(buf));
  7. }
  8.  
  9. void my_func2(char *buf)
  10. {
  11.     printf("Sizeof(2): %d\n", sizeof(buf));
  12. }
  13.  
  14.  
  15. int main(void)
  16. {
  17.     char buf[25];
  18.     my_func(buf);
  19.     my_func2(buf);
  20.     return 0;
  21. }
clone this paste RAW Paste Data