Describe the expected behavior of the program by reading the code.

1. Select ONE of the provided code segments.
2. Compile2 and run the code.

Questions
1. Program Analysis:
(a) (5 pts) Describe the expected behavior of the program by reading the code.
(b) (5 pts) Describe the input you used to cause a buffer overflow when you ran the code.

(c) (5 pts) How did the buffer overflow manifest? Provide the exact error you received as evidence.

2. (20 pts) Identify and describe the buffer overflow problem in the code.

3. (20 pts) Describe how you would prevent the buffer overflow from occurring in the code.

4. (40 pts) Correct the program to eliminate the buffer overflow problem from occurring. In the provided code, make sure you add comments to indicate what is being changed.

5. (5 pts) Describe the behavior of the corrected program.