Which of the following snippets prints a representation of 42 with two decimal places?

  1. printf("%.2d\n", 42);

  2. printf("%1.2f\n", 42);

  3. printf("%1.2u\n", 42);

  4. none of the above


Correct Option: B

Find more quizzes: