Checkpoint 15.6.1.
What does the
atoi()
function do?
- takes the absolute value of a number
- Incorrect! Go back and read for the answer.
- converts a double to an int
- Incorrect! Go back and read for the answer.
- converts a string to an int
- Correct! This is very helpful when we read numbers from a file (where they are strings).
- converts an int to a string
- Incorrect! Go back and read for the answer.