CP SC 1011: Lab 5, Fall 2022

Using an editor, answer the following questions:

NAME: Sloane McNelly

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

The seg fault was caused because the array was too small.

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

Line 28. if( table[i++] == 11 ) {

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

The value of "count" was 409.

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

The value of "i" was 409.

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

The value of "search" was 1.

6) What are the values in the "table" array?

The values in the table = number++ * 2

7) what do you think the bug is?

The progtam required more values than the array had. 
