Write a function that creates an integer array of size n and
Write a function that creates an integer array of size n and returns the address of that array (potentially NULL, if malloc() fails). The function signature should be://In addition to writing this function, fill in the blank//below with the correct return type. _______ create_integer_array(int n);
Solution
Function Code :
int * create_integer_array(int n){
return (int *)malloc(n, sizeof(int)); //it will return the base address of the dynamically created array memory.
}
Fucntion Signature :
int * create_integer_array(int n);
