Interview Question
- 0of 0 votes
AnswersYou can mix integers and non-integers in a single expression. For example:
- jaq0033@my.londonmet.ac.uk April 27, 2016 in United States
123."A"="123A" "4A"+123=127 "5.5"+5=10
Non-integers are converted to integers as required by the operators. The non-integer converts to an integer starting with the leftmost character and continuing until encountering a non- numeric character. In the second example above, "4A" converts to 4; in the third example,
"5.5" converts Question:
A. B. C. D. E. F.
to 5.
What is the value of "1.2"+3.4?
4.4
4.6
44
46.2
154
None of the above| Report Duplicate | Flag | PURGE
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.