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
What are the 4 types of unions?
Is register a keyword in c?
Which are low level languages?
What is assignment operator?
Can math operations be performed on a void pointer?
Why we use break in c?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
Why double pointer is used in c?
Explain how can you restore a redirected standard stream?
What is meant by realloc()?
State the difference between realloc and free.
Can we add pointers together?
Describe the modifier in c?
What is typedef struct in c?
Why static is used in c?