fork(3) download
  1. #include <cstring>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char a[] = "here";
  9. cout << sizeof(a) << endl;
  10.  
  11. char b[10] = "there";
  12. cout << sizeof(b) <<endl;
  13. for (int i = 0; i < 10; ++i)
  14. {
  15. cout << b[i] << endl;
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
5
10
t
h
e
r
e