fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. char* test[] =
  6. {
  7. "",
  8. " ",
  9. "1234569",
  10. "abc",
  11. "lastoneiquit"
  12. };
  13.  
  14. char test2[5][15] =
  15. {
  16. "",
  17. " ",
  18. "1234569",
  19. "abc",
  20. "lastoneiquit"
  21. };
  22.  
  23. std::cout << "Size of test: " << sizeof(test) << '\n';
  24. std::cout << "Size of test2: " << sizeof(test2) << '\n';
  25. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Size of test: 20
Size of test2: 75