nerdexam
EC-Council

EC0-350 · Question #126

EC0-350 Question #126: Real Exam Question with Answer & Explanation

Sign in or unlock EC0-350 to reveal the answer and full explanation for question #126. 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,
  • DAdd a separate statement to signify that if we have written 200 characters to the buffer, the stack

Unlock EC0-350 to see the answer

You've previewed enough free EC0-350 questions. Unlock EC0-350 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.

Full EC0-350 Practice