#include <iostream>
using namespace std;
int main()
{
int a[5]={1,2,3,4,5};
cout<<a[5]<<endl;
return 0;
}
why do I get a garbage value instead of "out of range" error?
#include <iostream>
using namespace std;
int main()
{
int a[5]={1,2,3,4,5};
cout<<a[5]<<endl;
return 0;
}
why do I get a garbage value instead of "out of range" error?