Question

Assuming myString is a 20-element char array, which of the following statements might result in buffer overflow?
(a) scanf("%19s", myString);
(b) scanf_s("%s", myString, 20);
(c) scanf_s("%19s", myString, 20);
(d)scanf("%s", myString);

Answer

This answer is hidden. It contains 3 characters.