CSU22014 Lab 5 : Bit Vector Sets Thursday 10th October When we program we often want to keep track of sets of things. For example, we might want to keep track of free seats in a cinema, or free spaces in a car park. Tracking sets of items becomes much easier if each item is identified by a unique identifier "key". The problem becomes even simpler if the "keys" have values in the range zero (or one) to number of items. This is common in many practical situations. For example, the ASCII table gives each character a unique number from zero to 255. Houses are commonly numbered 1 to the number of houses on a street. The same is true of seats on a rollercoaster, or junctions on a motorway. An abstract data type (ADT) is a set of type declarations and functions. We often put an abstract data type in its own separate files. In the following files, the bitset abstract data type is in the files bitset.h and bitset.c. The bitset.h file contains all the necessary declarations for another C file to use the bitset. The bitset.c file contains the code to implement each of the functions declared in bitset.h. Please download the file: https://www.scss.tcd.ie/David.Gregg/cs2014/labs/lab5-code.zip On the Linux command line you can do this with: wget https://www.scss.tcd.ie/David.Gregg/cs2014/labs/lab5-code.zip Next, unzip these files: unzip lab5-code.zip This will create a directory with three files: bitset.h, bitset.c and main.c. The functions in bitset.c are empty; please write code to make them work. To switch to the lab5-code directory type: cd lab5-code To compile the program, consisting of bitset.h, bitset.c and main.c, type: gcc -o bitset bitset.c main.c Note that both bitset.c and main.c include the file bitset.h using #include. You should use bit sets (also known as bit vectors) to represent the a set. A bit vector is an array of some (usually unsigned) integer type. Each bit in each integer is used to represent the presence or absence of one item from the class of items that can belong to the set. This is the first part of a two-part lab. There is nothing to submit this week.