Test: Swift - Floating Point Types
4. Which of the following represents 255 in Swift?
Congratulations! Correct Answer.
You Answered: None. If you took the test, your answer will show up here.
Correct Answer: let num = 25_5; let binNum = 0b11111111; let binNum = 0b1111_1111; let hexNum = 0xFF;
ExplanationEven though you might not choose to write 255 as 25_5, it is a valid representation. The underscore can be used to separate the digits. So, they all represent 255.
Take the TestTake the complete test on this topic. You will be able to review answers to questions and get a test score.
Take the Test
Question 4 of 5
Test is Based on this Article
More Articles With Similar Tags