4. Write a C function definition that has the following prototype: float *copyArray (float Values [], int numValues ); The fu

4. Write a C function definition that has the following prototype: float *copyArray (float Values [], int numValues ); The function should dynamically allocate enough memory to hold the array data, copy the array data to this memory and return a pointer to the memory. If the memory allocation fails the function should print an error message and terminate the program. Also write a main() function for testing your function.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *