nerdexam
EC-Council

312-92 · Question #50

312-92 Question #50: Real Exam Question with Answer & Explanation

Sign in or unlock 312-92 to reveal the answer and full explanation for question #50. The question stem and answer options stay visible for context.

Question

David is an applications developer working for Dewer and Sons law firm in Los Angeles David just completed a course on writing secure code and was enlightened by all the intricacies of how code must be rewritten many times to ensure its security. David decides to go through all the applications he has written and change them to be more secure. David comes across the following snippet in one of his programs: #include <stdio.h> int main(int argc, char **argv) { int number = 5; printf(argv[1]); putchar(`\n'); printf("number (%p) is equal to %d\n", &value, value); } What could David change, add, or delete to make this code more secure?

Options

  • AChange putchar(\n') to putchar("%s", \n')
  • BChange printf(argv[1]) to printf("%s", argv[1])
  • CChange printf(argv[1]) to printf(constv [0])
  • DChange int number = 5 to const number = ""

Unlock 312-92 to see the answer

You've previewed enough free 312-92 questions. Unlock 312-92 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 312-92 Practice
David is an applications developer working for Dewer and Sons law... | 312-92 Q#50 Answer | NerdExam