My system is Ubuntu
Here is my code:
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#define LEN 16
using namespace std;
int main(){
int a[16] = {2};
for (int i=0; i<16; i++)
{
cout << a[i] << ' ';
}
}
I compiled it by this command in terminal : g++ t1.cpp -o t1 && ./t1
but the result is
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0