When you call InputEmployeeData you are ping &firstname[9] which will p a pointer to the 10th element of the array firstname which is already beyond the end of the array. So no matter what the user inputs it's already going to write to memory outside of the array thus overwriting other areas in memory.
No comments:
Post a Comment