#include<stdio.h>
#include <stdlib.h>
int *ip_range ;
int main()
{
ip_range = (int *) malloc(1);
ip_range[0]=2;
ip_range[10]=2;
ip_range[20]=2;
ip_range[33787]=12444;
printf("%d\n", ip_range[33787]);
}
I have malloc just 1 block then why it is accessible till 33787 and generating core on 33788.