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