WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / ananth kumar
malloc
Holds 1 argument data type
allocates memory byte equivalent to data type
not init alloted memory
Calloc
Holds 2 arguments, data type and number of datas (n)
allocates memory block equivalent to n * data type
clears alloted memory with 0
| Is This Answer Correct ? | 173 Yes | 39 No |
Post New Answer View All Answers
Is c is a high level language?
#include
what are the advantages of a macro over a function?
ATM machine and railway reservation class/object diagram
What are c header files?
Explain the term printf() and scanf() used in c language?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
How do you determine a file’s attributes?
What is strcmp in c?
write a program to print largest number of each row of a 2D array
Which is best book for data structures in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
what is stack , heap ,code segment,and data segment
What does typeof return in c?
How do I create a directory? How do I remove a directory (and its contents)?