Test: Swift - Floating Point Types
3. let hexWithExp = 0x10p4 - What’s the value of hexWithExp in decimal?
Congratulations! Correct Answer.
You Answered: None. If you took the test, your answer will show up here.
Correct Answer: 256
ExplanationThe value of the exponent part to multiply is 2^4, which is 16. The hex number 0x10 will be 16 in decimal (1*16^1 + 0*16^0 = 16). And 16*16 is 256.
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 3 of 5
Test is Based on this Article
More Articles With Similar Tags