ProgrammingModerate

char b[16]; sprintf(b, "%d%%", 50); printf("%zu", strlen(b)); What is printed?

  1. A. 2
  2. B. 4
  3. C. 3
  4. D. 5

Correct answer: C. 3

%% produces one literal percent sign, so the text is '50%' with three characters.

More C Programming questions

Exams that ask this topic