|
Dynamic Allocation in C | |
|
| |
malloc
can be used for building linked structures, just as
the Pascal new operator, and similar to java's
new. The C calloc call
is usually used for what?
Give a C declaration, along with any needed executable code, to perform each of the following:
node_struct.
double
of the size you read in.
fred points to a string, create a variable copy
which is an exact independent copy of fred,
and does not waste any
space. That is, it is allocated no larger than needed to hold the
string.
| Answer | ADT Declarations in C |