IOS Meeting - Trivia

A vibrant illustration depicting iOS app development concepts, including code snippets, app icons, and a person engaging with technology in a modern workspace.

iOS Meeting - Trivia Challenge

Test your knowledge of iOS programming concepts with our engaging quiz! Whether you're a seasoned developer or just starting out, this trivia will challenge your understanding of key topics.

  • 11 Thought-provoking Questions
  • Multiple Choice & Checkbox Format
  • Great for Quick Learning
11 Questions3 MinutesCreated by CodingGuru57

What's the use of outerLoop?

    let numbers = 1...100

    outerLoop: for number1 in numbers {

        for number2 in numbers {

            if number1 == number2 && number1 * number2 == 144 {

                print("Square found: \(number1)")

                break outerLoop

            }

        }

    }

Label the first iteration for an early exit
It doesn't compile 😖
Save the state of the iteration
Copy the value for each iteration

What does this function return?

  func test(input: String) -> Character {

        var value: Character = Character("1")

        test: if !input.isEmpty {

            for char in input {

                if char == Character("h") {

                    continue test

                }

            }

            value = Character("2")

        }

        return value

    }

    test(input: "hola mundo")

1
It doesn't compile 😖
2
H
Which is not a Control Transfer Statement
Return
Break
Continue
Throw
Fallthrough
Case
While
What is the type of x and y?
 
 
let (x, y) = (1, 2)
Int
(Int, Int)
[Int: Int]
[Int]
Having a VERY long array... Which one is the slowest?
Nums.dropFirst()
Nums[1...]
Nums.suffix(from: 1)
Given an Array. Which one is faster?
Array.reversed()
Array.reverse()
Array is
Value Type
Reference Type
Which of these capture list is invalid?
[weak a, weak b]
[a, b]
[unowned a, weak b]
[unowned(safe) a]
[unowned(unsafe) a, b]
All of them are valid
What is the type of a?
let (a) = 2
Int
(Int)
What's the value of a
 
let a = UIInt8.min
0
16
-255
255
What output will be produced by the code below?
 
class Starship {
    var type: String
    var age: Int
}

let serenity = Starship(type: "Firefly", age: 24)
print(serenity.type)
Firefly
""
Compile but do not print
Do not compile
{"name":"IOS Meeting - Trivia", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of iOS programming concepts with our engaging quiz! Whether you're a seasoned developer or just starting out, this trivia will challenge your understanding of key topics.11 Thought-provoking QuestionsMultiple Choice & Checkbox FormatGreat for Quick Learning","img":"https:/images/course2.png"}
Powered by: Quiz Maker