ProgrammingModerate

int n = 0; sscanf(" 42 abc", " %d", &n); printf("%d", n); What is printed?

  1. A. 0
  2. B. 4
  3. C. 42
  4. D. 2

Correct answer: C. 42

The leading space in the format skips the whitespace, then %d reads 42.

More C Programming questions

Exams that ask this topic