Lab 5, Spring 2023

Using an editor, answer the following questions:

NAME: Andres Perez

---------
example.c
---------
1) What is the cause of the seg fault in the program called example.c?
In a while loop, the condition was missing an "=" sign so it did not read that it was equal to.


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

3) What was the value of the variable "count" at the time of the seg fault?
count = 9

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

5) What was the value of the variable "search" at the time of the seg fault?
search = 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 condion was trying to set search to 1 rather than checking if it was equal to 1.

