Question: hello, im trying to do an addItem function by copying the old array into a new array and then adding the elelment into the array

hello, im trying to do an addItem function by copying the old array into a new array and then adding the elelment into the array in C. but it is not working at all. cannsomeone tell me what i am doing wrong? thank you hello, im trying to do an addItem function by copying the old

int *addItem(int *Length, int *array) { int *myArray = (int*)calloc( nmemb: *length+1, sizeof(int)); int value, i; printf( format "Please enter a value to add to the array. "); value = readNum(); for(i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!