in C Plus Plus by
Q:
What are the differences between malloc () and calloc () in C Language?

1 Answer

0 votes
by

Malloc C

2-It initializes the contains of block of memory to zerosMalloc takes one argument, memory

allocated contains garbage values.

It allocates contiguous memory locations. Calloc takes two arguments, memory allocated

contains all zeros, and the memory allocated is not contiguous.

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

+1 vote
asked Jul 16, 2019 in C Plus Plus by Indian
0 votes
asked Mar 10, 2020 in C Plus Plus by rahuljain1
0 votes
asked Mar 12, 2020 in C Plus Plus by rahuljain1
+1 vote
asked Mar 17, 2020 in C Plus Plus by SakshiSharma
0 votes
asked Mar 17, 2020 in C Plus Plus by rajeshsharma
...