Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void fortune_cookie(char msg[])
  4. {
  5. printf ("Message reads: %s\n" , msg);
  6. printf ("msg occupies %i bytes\n" , sizeof (msg));
  7. }
  8.  
  9. int main(){
  10.  
  11. char quote[] = "Cookies make you fat" ;
  12.  
  13. fortune_cookie(quote);
  14.  
  15. printf("The quote string is stored at: %p\n", quote);
  16.  
  17. printf("Message reads: %s\n", quote);
  18.  
  19. printf("msg occupies %i bytes\n", sizeof(quote));
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement