nerdexam
GAQM

CPEH-001 · Question #191

Which of the following programming languages is most susceptible to buffer overflow attacks, due to its lack of a built-in-bounds checking mechanism? Code: #include <string.h> int main(){ char…

The correct answer is D. C++. See the full explanation below for the reasoning.

Question

Which of the following programming languages is most susceptible to buffer overflow attacks, due to its lack of a built-in-bounds checking mechanism? Code:

#include <string.h> int main(){ char buffer[8]; strcpy(buffer, ""11111111111111111111111111111""); } Output:

Segmentation fault

Options

  • AC#
  • BPython
  • CJava
  • DC++

How the community answered

(25 responses)
  • A
    4% (1)
  • B
    12% (3)
  • C
    8% (2)
  • D
    76% (19)

Community Discussion

No community discussion yet for this question.

Full CPEH-001 Practice