#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
main()
{
int *ptr,i;
ptr=(int*)malloc(sizeof(int));
printf("sizo of ptr is:%d",sizeof(ptr));
for(i=0;i<30;i++)
scanf("%d",ptr+i);
for(i=0;i<30;i++)
printf("%d",*(ptr+i));
getch();
}
here size of ptr is:4 my question is, i suppose to be store only one integer in ptr but here in this program i could store more than 30 or 100 etc, why it is not throwing an error?