Here my doubt is, if ptr value is 0 which is NULL, why access to b using ptr (ptr->b) is not crashing .

Thanks.