Interview Questions

185. test atof(char *s)

Microsoft Interview Questions and Answers


(Continued from previous question...)

185. test atof(char *s)

Question:
test atof(char *s)


maybe an answer:


Test cases
1. normal float string like "1.2"
2. float string with out fraction like "10"
3. float string only fraction like ".7647834"
4. float string with prefix and suffix Zeros like "0.213232" "000001.487348" "3.54500000" , "4.0"
5. Negative float numbers like "-23.545"
6. minimum & maximum float strings to check boundary conditions.
7. check rounding & truncate float strings like "1.5555555555555" "1.5555555555556666"

(Continued on next question...)

Other Interview Questions