Multiple choice technology programming languages

The printf format "%6.2f" displays a number

  1. At least six columns wide in total, with two figures after the decimal place

  2. Exactly six digits before the decimal place, and two digits after

  3. At least six digits before the decimal place, and two digits after

  4. Exactly six columns wide in total, with two figures after the decimal place

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In printf-style formatting, the format specifier %6.2f specifies a minimum field width of 6 characters in total (padding with spaces if necessary) and exactly 2 digits after the decimal point.