1#include<stdio.h>
2
3int main()
4{
5 float a=3.15529;
6 printf("%2.1f\n", a);
7 return 0;
8}
9
10
11[A]. 3.00
12[B]. 3.15
13[C].
143.2 @
15[D]. 3
16Answer: Option C
17
18Explanation:
19
20float a=3.15529; The variable a is declared as an float data type and initialized to value 3.15529;
21
22printf("%2.1f\n", a); The precision specifier tells .1f tells the printf function to place only one number after the .(dot).
23
24Hence the output is 3.2