{infiniteZest}
// Articles. Tutorials. Utilities.
Home  |   Search  |   Login  
Categories Skip Navigation Links
New / All
AJAX
Apple
ASP.NET
.NET
Git
Google / Android
Python / IronPython
Miscellaneous
SQL Server
Test: Swift - Integer Types

3. var level: UInt8 = 10 - What range of values can level hold in Swift?



Results
Congratulations! Correct Answer.
You Answered: None. If you took the test, your answer will show up here.
Correct Answer: 0 to 255
Explanation
Unsigned Integer types can only hold positive values, not negative values. And 8-bit number can hold a maximum value of 2^8-1, which is 256-1, which is 255. So, UInt8 can hold values ranging from 0 to 255.
Take the Test
Take 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
icon-swift-article.jpg
Tags: int, types, swift
This article goes through the usage of various integer types in Swift (including Int and UInt).
icon-swift-test.jpg
Tags: int, types, swift
Test on Integer types in Swift.

More Articles With Similar Tags
icon-swift-test.jpg
Tags: int, types, swift
Test on Integer types in Swift.
icon-swift-series.jpg
This series of articles goes through the basics of Swift. It introduces Playgrounds and REPL; Variables and Constants; Int, Float, Bool; Tuples, Type Aliases, Type Inference, Type Safety, and more.
icon-swift-article.jpg
Tags: bool, types, swift
This article discusses the boolean types in Swift and contrasts with how these types are used in C and Objective-C.
icon-swift-test.jpg
Tags: bool, types, swift
Test on Boolean Types in Swift.
icon-swift-article.jpg
This article talks about decimal numbers in Swift, including Float, Double, and CGFloat. Also talks about Binary, Octal, and Hexadecimal representations.
                                                                                                                                                                                                             
About  Contact  Privacy Policy  Site Map