Computer Science, asked by ayush130403, 18 days ago

write a C Program to enter the elements in an array by allocating memory using malloc( ) or calloc( ) and then display the count of each element of the array.
Example:
Input:
size 5
enter the elements:
1 2 1 2 2

Output:
1- occurs 2 times
2- occurs 3 times​

Answers

Answered by adityaray38970
0

Answer:

The C malloc() function stands for memory allocation. It is a function which is used to allocate a block of memory dynamically. It reserves memory space of specified size and returns the null pointer pointing to the memory location.22-Nov-2021

Malloc(): Allocates the memory of requested size and returns the pointer to the first b...

Calloc(): Allocates the space for elements of an array. Initializes the elements to zero ...

Free(): Frees or empties the previously allocated memory space

Similar questions