Hi all, my question is that
int a[2]={0}; cout<<a[1]; output is o
but if i do int a[2]; a[0]=1; cout<<a[2]; output is a garbage value on g++ ubuntu 10.04
in both case's it's partial initialization of array's then why different output's????
Hi all, my question is that
int a[2]={0}; cout<<a[1]; output is o
but if i do int a[2]; a[0]=1; cout<<a[2]; output is a garbage value on g++ ubuntu 10.04
in both case's it's partial initialization of array's then why different output's????