Examveda

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\n", str, res);

A. String value = 123546, Float value = 123546.0

B. String value = 123546 , Float value = 123546.000000

C. String value = 123546 , Float value = 0.000000

D. String value = 123546 , Float value = 123546.000

Answer: Option B


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions