WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / nazia wasim
malloc and calloc both are used to allocate
memory dynamically but the difference is
malloc allocates single block of memory and
calloc allocates multiple block of memory as
per the requirement.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
When should we use pointers in a c program?
What is const and volatile in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
write a program to find out prime number using sieve case?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What does int main () mean?
What is a method in c?
Is anything faster than c?
how is the examination pattern?
What is volatile variable in c?
What are extern variables in c?
What is the difference between c &c++?
What is variable in c example?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
How can I do serial ("comm") port I/O?