ProgrammingHard

int a, b; int n = sscanf("12-34", "%d-%d", &a, &b); printf("%d", b); What is printed?

  1. A. 12
  2. B. 2
  3. C. 34
  4. D. 43

Correct answer: C. 34

sscanf reads 12, matches the literal '-' and then reads 34 into b. The printed value is 34.

More C Programming questions

Exams that ask this topic