I want to create a boolean array whose size is 31623 and all values assigned to 0. However for this code when i print some values are different than 1 or 0. Am I wrong anywhere in declaration or printing???
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream>
usingnamespace std;
int main()
{
bool arr[31623] = {false};
for (int i = 0; i < 31623; i++) {
cout << arr[i] << endl;
}
return 0;
}