In Problems 2, you will be reading input from a file; use the fscanf() function to do so. When reading input from a file, you do not need to verify its validity. You can assume that it has the expected type and the expected value(s). In Problem 1, you will be reading input from stdin; input verification requirements for Problem 2 are described therein.
In each of the three problems in this lab, you will be required to declare and define certain functions. Doing so is essential: code that compiles and runs correctly, but does not implement all the required functions will not receive full credit. You are also welcome to implement additional functions. While this is not required, it can make your code easier to write.
And you should not use any functions from the C standard library, except for those functions that are declared in the file , such as printf (or fprintf), scanf (or fscanf), fopen, fclose, etc. In Problem 1, you can also use the functions rand and srand declared in and the function time declared in