Vidyalelo
C Programming · Q61

Standard Library Functions

Programming · C Programming · question 61

Q61

What will be the output of the following C code? char str[20]; str= "123546"; res= atof(str); printf("String value = %s, Float value = %f ", str, res);

A.
String value = 123546, Float value = 123546.0
B.
String value = 123546 , Float value = 123546.000000
Answer
C.
String value = 123546 , Float value = 0.000000
D.
String value = 123546 , Float value = 123546.000

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board