Question: For the code provided on the Code page, when these lines are executed (from main() of test_list.c), how many calls to malloc are made? int

For the code provided on the Code page, when these lines are executed (from main() of test_list.c), how many calls to malloc are made? int arr[] = {9,1,7,260}; int N = sizeof(arr)/sizeof(int); struct node * L = array_2_list(arr, N); print_list_pointer(L); L = delete_node (L, NULL); print_list_pointer(L); nodePT ptr = new_node(25); L = insert_node (L, NULL, ptr); // try to run just: insert_node(L, NULL, pt r); see valrind error. print_list_pointer (L); O 1 O 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
