You were tasked to do programs that will illustrate the use of lists implemented using an array. One uses a sorted list, the other an unsorted list. Run the programs separately and answer the following questions. 1. Write a C program that will initially create an UNSORTED list containing the following and then run the program: Mitch Diane Jack Robbie Katherine Answer and explain the following questions below: a) If we check the memory location of each element in the list, what would it be? What index represent each element? b) What happens if we add Morrie in the list? What will be its index value? c) What does the new list look like? Where do you think Morrie should be placed and why? With the same list above (with Morrie added), delete/remove Jack. Answer and explain the following questions below: a) What is the new list? Identify the elements of the list and its index. b) What happened to the former location occupied by Jack?
You were tasked to do programs that will illustrate the use of lists implemented using an
array. One uses a sorted list, the other an unsorted list. Run the programs separately
and answer the following questions.
1. Write a C program that will initially create an UNSORTED list containing the following and
then run the program:
Mitch
Diane
Jack
Robbie
Katherine
Answer and explain the following questions below:
a) If we check the memory location of each element in the list, what would it be? What
index represent each element?
b) What happens if we add Morrie in the list? What will be its index value?
c) What does the new list look like? Where do you think Morrie should be placed and
why?
With the same list above (with Morrie added), delete/remove Jack. Answer and explain
the following questions below:
a) What is the new list? Identify the elements of the list and its index.
b) What happened to the former location occupied by Jack?
Step by step
Solved in 3 steps with 1 images