Ro*****@gmail.com writes:
I see calloc() can do malloc() and initial to value 0 , I wonder if
that means I can ALWAYS use calloc instead of malloc() ?
You can, but there's not much reason to do so. Initializing allocated
memory to all-bits-zero is not usually what you want to do. For
example, this does *not* guarantee that pointers or floating-point
variables will be set to NULL or 0.0, respectively.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.