In the line that reads “println ( float ( lines [currentPoint] ) ) ;”, which of
ID: 3865296 • Letter: I
Question
In the line that reads “println ( float ( lines [currentPoint] ) ) ;”, which of the following is the best description of what “float” does?
Converts lines[currentPoint] to an integer.
Converts an element of lines to a number with a fractional part.
Selects a random line to print
Converts the variable currentPoint to a number with a fractional part
Converts lines[currentPoint] to an integer.
Converts an element of lines to a number with a fractional part.
Selects a random line to print
Converts the variable currentPoint to a number with a fractional part
Explanation / Answer
Ans)Converts an element of lines to a number with a fractional part.
Reason:
Here according to the question lines is an array and currentPoint is an index pointing to the elements of an lines array.
so lines[currentPoint] is the element in the lines array and we are type casting that element value into float type number.
So "Converts an element of lines to a number with a fractional part." is right
_____________Could you rate me well.Plz .Thank You
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.