fork download
  1. #include <iostream>
  2.  
  3. struct foo {
  4. char bar[ 10 ];
  5. };
  6.  
  7. void foobar( struct foo bar )
  8. {
  9. std::cout << sizeof(bar) << '\n';
  10. std::cout << sizeof(void *) << '\n';
  11. }
  12.  
  13. int main()
  14. {
  15. struct foo bar;
  16. std::cout << sizeof(bar) << '\n';
  17.  
  18. foobar(bar);
  19. }
  20.  
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
10
10
4