fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void myfunc(char passedArray[])
  5. {
  6. cout << sizeof(passedArray) << endl; // prints 4
  7. }
  8.  
  9. int main(void)
  10. {
  11. char charArray[] = "abcdefghiklmop";
  12.  
  13. cout << sizeof(charArray) << endl; // prints 15
  14. myfunc(charArray);
  15. cout << sizeof(charArray) << endl; // prints 15
  16. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
15
4
15