If we simply declare an integer variable in C++ , and print it why am I getting 0 instead of garbage value every time. How to declare each element of array as 1 without using loop.
#include<iostream>
using namespace std;
int main()
{
int a;
cout<<a; // displays zero
}