fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void sher(int a[]) {
  5. cout << "in fun: " << sizeof(a) / sizeof(a[0]) << '\n';
  6. }
  7.  
  8. int main() {
  9. int a[] = {1, 2, 3, 4};
  10. sher(a);
  11. cout << "out fun: " << sizeof(a) / sizeof(a[0]) << '\n';
  12. return 0;
  13. }
Success #stdin #stdout 0s 4244KB
stdin
Standard input is empty
stdout
in fun: 2
out fun: 4