Categories
|
Test: Swift - Boolean Types 5. var isTest = false; if(!isTest) { print(“Not a Test”) } - What does it print?
Results Congratulations! Correct Answer. You Answered: None. If you took the test, your answer will show up here. Correct Answer: Not a Test Explanation Here if control statement can check isTest variable, which is of Bool type. Its original value is false and ! operator negates it — meaning the value now will be true. That means, the if block will get executed and print “Not a Test”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 5 of 5
Test is Based on this Article
This article discusses the boolean types in Swift and contrasts with how these types are used in C and Objective-C.
|
Test on Boolean Types in Swift.
|
|
More Articles With Similar Tags
|
Test on Boolean Types in Swift.
|
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.
|
This article goes through the usage of various integer types in Swift (including Int and UInt).
|
Test on Integer types in Swift.
|
This article talks about decimal numbers in Swift, including Float, Double, and CGFloat. Also talks about Binary, Octal, and Hexadecimal representations.
|
|
|
|
|