C - Input and Output
You want to print a floating-point number
float pi = 3.14159; with only 2 decimal places. Which printf statement is correct?float pi = 3.14159; with only 2 decimal places. Which printf statement is correct?%.2f where 2 is the number of decimals.%2f sets minimum width, not decimals; %f.2 is invalid; %f prints 6 decimals by default.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions