Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void f(int arr[]) // == void f(int *arr)
  4. {
  5. size_t size = sizeof(arr);
  6.  
  7. printf("Size in f(): %d\n", size);
  8. }
  9.  
  10. void main()
  11. {
  12. int arr[] = { 10, 20, 30 };
  13. size_t size = sizeof(arr);
  14.  
  15. printf("Size in main(): %d\n", size);
  16. f(arr);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement