fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. int array[10] ;
  6. int * pointer ;
  7.  
  8. std::cout << "array size: " << sizeof(array) << '\n' ;
  9. std::cout << "pointer size: " << sizeof(pointer) << '\n' ;
  10.  
  11. // ++array; // illegal.
  12. ++pointer ;
  13.  
  14. // array = 0; // illegal.
  15. pointer = 0 ;
  16. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
array size: 40
pointer size: 4