fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // int* b1 = {1, 2, 3, 4}; コンパイルエラー
  6. int b2[4] = {5, 6, 7, 8};
  7. int b3[] = {9, 10, 11, 12};
  8. // cout << "b1:" << sizeof(b1) << std::endl;
  9. cout << "b2:" << sizeof(b2) << std::endl;
  10. cout << "b3:" << sizeof(b3) << std::endl;
  11. return 0;
  12. }
Success #stdin #stdout 0s 15224KB
stdin
Standard input is empty
stdout
b2:16
b3:16