Swift Test
All Swift classes must inherit from which root class?
Can enumeration type have methods?
Considering var index = UInt8.max, which of the following operation results to the value of zero for var index?
Given that we have defined myChar like so : let myChar: Character = "b" Which code segment can be considered a complete Switch statement and will run without any error?
If we have a class named MyClass with a nested enum called Status, declared like so: class MyClass { enum Status { case On, Off } } How would one indicate that a variable is an enum...
In context of a Swift subscript, which of the following is correct?
What attribute can be used to allow a protocol to contain optional functions and to be used in ObjC?
What does a retainCount represent in ARC?
What is the name of the deinitializer in a Class declaration?
What is the name of the Swift language feature that Objective-C Blocks are translated into?
What is the name of the Xcode generated header file used to import Swift classes into an Objective-C Class given a product module named Example?
What is the output of this segment of code ? var x = 0 for index in 1...5 { ++x } println("(x)")
What is the type of Swift Enumerations?
What is used to import Objective-C files into Swift?
What keyword is used to indicate a custom operator that will appear in between two targets, similar to the addition operator in this example? var sum = 10 + 10
What type of object are Swift Structures?
When declaring an enumeration, multiple member values can appear on a single line, separated by which punctuation mark?
Which is the wrong definition of a protocol in Swift?
Which is correct for Enumerations?
Which is correct regarding Swift enumeration members when they are defined?
Which is used for down casting?
Which keyword do you use to declare enumeration?
Which keyword in the context of a Switch statement is required to force the execution of a subsequent case?
Which keyword is used in Swift when we want a property of a class to initialize when it is accessed for the first time?
Which keyword is used on a function in an enumeration to indicate that the function will modify 'self'?
Which of the following could be used to indicate the Function Type of the following function: func joinStrings(stringOne: String, stringTwo: String) -> String { return stringOne + stringTwo }
Which of the following declares a mutable array in Swift?
Which of the following statements could be used to determine if a given variable is of String type?
Which of the following structures has both computed and stored properties?
Which of the following types can be used use as raw value types for an enumeration?
Which of these could be an appropriate protocol declaration in Swift?
Which of these is a valid definition of a generic function that incorporates inout parameters in Swift?
Which of these is a valid syntax for iterating through the keys and values of a dictionary? let dictionary = [keyOne : valueOne, keyTwo : valueTwo]
Which of these is an appropriate syntax for declaring a function that takes an argument of a generic type?
Which of these is an appropriate syntax for dispatching a heavy operation to a background thread?
Which of these is not a valid property declaration in Swift?
Which of these statements is a valid way to extend the capabilities of our theoretical class, MyClass to conform to protocol MyProtocol?
Which one creates a dictionary with a key type of Integer and value of String?
Which one is the correct keyword for defining a constant in Swift?
Which one of the below functions definitions is wrong considering Swift language?