EC-Council
312-50V7 · Question #74
312-50V7 Question #74: Real Exam Question with Answer & Explanation
Sign in or unlock 312-50V7 to reveal the answer and full explanation for question #74. The question stem and answer options stay visible for context.
Question
Buffer X in an Accounting application module for Brownies Inc. can contain 200 characters. The programmer makes an assumption that 200 characters are more than enough. Because there were no proper boundary checks being conducted, Bob decided to insert 400 characters into the 200- character buffer. (Overflows the buffer). Below is the code snippet: How can you protect/fix the problem of your application as shown above?
Options
- ABecause the counter starts with 0, we would stop when the counter is less than 200
- BBecause the counter starts with 0, we would stop when the counter is more than 200
- CAdd a separate statement to signify that if we have written less than 200 characters to the buffer, the
- DAdd a separate statement to signify that if we have written 200 characters to the buffer, the stack should
Unlock 312-50V7 to see the answer
You've previewed enough free 312-50V7 questions. Unlock 312-50V7 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.