CP SC 1011: Lab 5, Fall 2022

Using an editor, answer the following questions:

NAME: Robbie Rucker II

---------
example.c
---------
1) What is the cause of the seg fault in the program called example.c?

The for loop was not set up correctly. In line 10, i was set to 0, the conditional
was to i>=0 and the counter was i++. This led to the for loop going out of its 
assigned memory causing a seg fault. 

--------
broken.c
--------
2) What line in broken.c did the program seg fault on?
 It was on line 27.

3) What was the value of the variable "count" at the time of the seg fault?
The value was at 10. 

4) What was the value of the variable "i" at the time of the seg fault?
Its value was at 0.

5) What was the value of the variable "search" at the time of the seg fault?
Its value was at 1.

6) What are the values in the "table" array?
{5, 10, 12, 14, 16, 18, 20, 22, 24, 26}

7) what do you think the bug is?
The while loop on line 27 was not set to be equivalent but rather setting the 
value of that variable. 

