Recently I started learning C by myself, so might be a bit newbie question. I have compiled the following commands:
#include <stdio.h>
int main()
{
int arr[5]={0};
int arr2[5]={0};
printf("%d\n",arr[5]); //here output: 2130567168
printf("%d\n",arr2[5]); //here output: 0
return 0;
}
can anybody explain the reason for the different outputs?