ProgrammingVery hard

printf("%5.3s|", "abcdef"); What is printed?

  1. A. abcde|
  2. B. abcd|
  3. C. abc|
  4. D. abcdef|

Correct answer: C. abc|

The precision .3 keeps three characters, and the width of five pads them on the left with two spaces.

More C Programming questions

Exams that ask this topic