#include <bits/stdc++.h> using namespace std; int main() { array<int, 5> arr = {1}; // -> {1, 0, 0, 0, 0} for(int i = 0;i<5;i++) { cout << arr[i] << " "; } }
Standard input is empty
1 0 0 0 0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!