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)- A4% (1)
- B12% (3)
- C8% (2)
- D76% (19)
Community Discussion
No community discussion yet for this question.