Answer Posted / vara
There are two differences.
1) is the number of arguments. Malloc() takes a single
argument (memory required in bytes), while calloc() needs
two arguments (number of variables to allocate memory, size
in bytes of a single variable).
2)malloc() does not initialize the memory allocated, while
calloc() initializes the allocated memory to ZERO.
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures
Can the sizeof operator be used to tell the size of an array passed to a function?
What are linked lists in c?
formula to convert 2500mmh2o into m3/hr
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Why can’t we compare structures?
praagnovation
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
Why is c so popular?
What is the use of f in c?
What are pointers in C? Give an example where to illustrate their significance.
What are predefined functions in c?
Explain the use of #pragma exit?
Explain function?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1