Programming Assignment 2
CS 30200 / ECE 46810
Operating Systems
Spring, 2022

This assignment makes use of the files contained in this zip file. This assignment is due Monday, February 14.

In the zip file there are C files hw2.h and hw2.c. Your assignment is to complete hw2.h so that the file hw2.c will compile and run. When you run hw2.exe it should produce output that looks exactly like the contents of the file hw2_output.txt. You should not make any changes to the file hw2.c. You should only modify the file hw2.h.

The file hw2.h declares three structs and it declares (with empty implementations) five functions. You need to complete the five function implementations. The first four functions convert a value of one type of struct into a value of another type of the struct. The functions use all of the input and output patterns that are discussed in the following zip file.

The fifth function, bundleIntoC(), takes as input two arrays (of different types of structs) and it should combine the two arrays into a third array made up of the third kind of struct. Your implementation of bundleIntoC() should make use of your functions convertAtoC() and convertBtoC().

When you have completed the file hw2.h, you can combine it's contents with the contents of hw2.c into a single source file on the C-Tutor. You can then use C-Tutor to either debug your code or just visualize it after it is completely working.

The goal of this assignment is for you to practice all of the tricks that C programmers use when defining functions. These tricks make a lot of use of pointers and dynamic memory allocation. We will see these tricks get used by almost all the C functions defined by the Windows operating system, and also by many of the Standard C Library functions, like scanf.

Turn in a zip file called CS30200Hw2Surname.zip (where Surname is your last name) containing your version of hw2.h.

This assignment is due Monday, February 14.