UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

7.9.5.  Creating a linked lists

Resources

  • Program implementing a menu with various options and the functions struct node *create_node(struct ap_scan_info *cell) and void print_node(struct node *node_ptr) already implemented.

  • Folder with name List_aps in your shared folder in Subversion. Local copy available here.

  • To self-checking your code, you can use: test_menu_operations_dynnamic_list_en.sh

Work Plan

Using the program of the option menu with the previously mentioned functions, make the following modifications:

  1. Implement the function struct node *create_list(struct ap_scan_info *array, int size) that receives as input parameters an array of data structures struct ap_scan_info and returns a linked list. In order to obtain this, use the previously defined data type and the function struct node *create_node(struct ap_scan_info *cell) (from the previous activities).

  2. Add and implement a new menu option to create a linked list from the array. Store this list in a variable so that it can be used in other options.

  3. Add and implement a new menu option to show all the access points in the linked list. Use the function void print_node(struct node *node_ptr) from the previous activities.

  4. Add the required code so that the list, if it exists, is destroyed when the program terminates.

Optionally, upload the file to the repository with svn commit.