I have one doubt may be so many guys answer this.
We know that malloc use to allocate dynamic memory. But while writing programs we use to check with NULL.
If(p==NULL)printf(“mem alloction failed”);// <-----(When dynamic allocation fail)
1. When will memory allocation fail?
2. I have a scenario that it should not be fail at any cost for that what I should do?