Lab 5 prelab
For this lab we'll be presenting you some code which contains a bunch of errors.
It's your job to flush them out.
Errors come in a few different flavors,
the main ones being compilation errors, run-time errors, and semantic errors
Compilation errors prevent the program from being compiled into an executable and are generally the result of syntactical errors.
If you write invalid code, miss semicolons or braces, or use incorrect types, these sorts of errors occur.
Run-time errors are the result of invalid accesses during execution.
Trying to reserve too much memory, read from a file which doesn't exist,
or access invalid memory such as with a scanf without an ampersand
will result in an error of this type.
Usually results in a Segmentation Fault.
Semantic errors are perhaps more accurately described as bugs than errors.
When your program runs correctly, but doesn't produce correct output, this is known as a semantic error.
The code is syntactically correct, and the computer is doing everything that you told it to, but there is a gap
between what you told it to and what you actually want it to do.
These are tricky errors to find, and might not occur in every situation.
The majority of the errors found in this code are semantic errors, which don't cause the program to crash,
but mean the program does not perform it's intended purpose.
Attached is some code which plays tic-tac-toe, all mashed up in main.
In lab, you'll be given a version of this code which has been cleaned up, but in the process errors were introduced.
You'll need to detect these errors, and report them.