What is malloc and calloc?



What is malloc and calloc?..

Answer / Manoj Verma

malloc() in C is a library function that dynamically allocates memory of a specified size. calloc(), on the other hand, also dynamically allocates memory but initializes it to zero.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Explain what a Binary Search Tree is.

3 Answers  


What is this infamous null pointer, anyway?

1 Answers  


List some of the dynamic data structures in C?

1 Answers  


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

1 Answers  


5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort

2 Answers   Accenture,


How is = symbol different from == symbol in c programming?

1 Answers  


What is the purpose of Scanf Print, getchar, putchar, function?

3 Answers  


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

0 Answers   Ignou,


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1 Answers  


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

1 Answers  


Is main a keyword in c?

1 Answers  


write a code for large nos multilication (upto 200 digits)

2 Answers   Persistent,


Categories