Multiple choice softskills creativity

output?? int main() { printf("%0.4f",3.414164); return 0; }

  1. 3.4141

  2. 3.41426

  3. 3.414164

  4. 3.4142

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

The format specifier %0.4f means print with 4 decimal places. Standard rounding applies: 3.414164 rounded to 4 places looks at the 5th digit (6), which rounds the 4th digit up from 1 to 2. Therefore 3.4142 is printed. Options A, B, and C are incorrect because they either truncate or round incorrectly.