EC-Council
312-92 · Question #69
When the following code is compiled and run is a program what size block will be used to hold name string? #include <stdio.h> int main(int argc, char **argv) { char target[5]="TTTT"; char…
The correct answer is C. 32 bytes. See the full explanation below for the reasoning.
Question
When the following code is compiled and run is a program what size block will be used to hold name string? #include <stdio.h> int main(int argc, char **argv) { char target[5]="TTTT"; char attacker[11]="AAAAAAAAAA"; strcpy(attacker, " DDDDDDDDDDDDDD"); printf("% \n", target); return 0; }
Options
- A16 bytes
- B28 bytes
- C32 bytes
- D8 bytes
How the community answered
(43 responses)- A2% (1)
- B14% (6)
- C77% (33)
- D7% (3)
Community Discussion
No community discussion yet for this question.