'buff' is a 10 characters long string (from 0 to 9) and the user is trying to write the 11th position, which is over its last position. So the right answer is B. overflow
The answer is B (buffer overflow)
Reasons:
The buffer buff is defined to hold 10 elements (indices 0 through 9).
Writing to buff[10] attempts to access memory beyond the allocated buffer size.
This can lead to overwriting adjacent memory, potentially corrupting data, crashing the application, or enabling the execution of malicious code.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
n19htf4ll
2 days, 1 hour agonicejob
2 months, 2 weeks agoOsanyindoro
3 months agoBooict
3 months agoBooict
3 months ago