Q: "When the seg fault occurs what is the value of i?"
A : When the segmentation fault occurs, the value of i is always 0.