Does malloc(0) return a valid pointer or NULL?
Posted
by Jaspreet
on Stack Overflow
See other posts from Stack Overflow
or by Jaspreet
Published on 2010-03-22T10:57:56Z
Indexed on
2010/03/22
11:01 UTC
Read the original article
Hit count: 183
Filed under:
c
Hi
Malloc() is used for dyamic memory allocation and returns a pointer (void*) to the memory allocated. What happens if i pass zero in malloc as an argument. Does a valid memory allocation takes place? Explain
© Stack Overflow or respective owner