English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

When there is no more memory available to allocate c/malloc return NULL If they return NULL, errno (see errno.h) will be set to appropriate error. You can get the error text using perror().

2007-01-31 22:49:08 · answer #1 · answered by KashAI 2 · 0 0

these functions return a NULL pointer if the requested memory space is not available. the space is allocated in after the end of the data segment and beginning of the code.
the functions will also return NULL if the size requested is 0.

2007-01-31 22:49:54 · answer #2 · answered by Divya K 1 · 0 0

malloc() or calloc() return null pointer in case of failure in allocating memory

2007-01-31 22:57:09 · answer #3 · answered by rishi 1 · 0 0

fedest.com, questions and answers