nerdexam
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)
  • A
    2% (1)
  • B
    14% (6)
  • C
    77% (33)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 312-92 Practice