fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.  
  7.  
  8.  
  9.  
  10. array<int, 5> arr = {1}; // -> {1, 0, 0, 0, 0}
  11.  
  12. for(int i = 0;i<5;i++) {
  13. cout << arr[i] << " ";
  14. }
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. }
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
1 0 0 0 0