All Swift quizzes
Advanced30 questions75 minutes

Swift Advanced Quiz

Master generics, memory management, concurrency, advanced patterns, and SwiftUI

Start the quiz

Sample questions from this quiz

A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.

1. What is generics?

  • Write flexible, reusable functions and types
  • Polymorphic types
  • Type parameters
  • Template programming
Show answer

Answer: Write flexible, reusable functions and types. Generics enable type-safe reusable code: func swap<T>(_ a: inout T, _ b: inout T). Array<T>, Dictionary<K, V>. Constraints with where. Core Swift feature.

2. What is ARC?

  • Automatic Reference Counting for memory management
  • Garbage collector
  • Reference counter
  • Memory manager
Show answer

Answer: Automatic Reference Counting for memory management. ARC automatically manages memory. Tracks references. Deallocates at zero. Classes only. Strong/weak/unowned references. No garbage collection. Deterministic cleanup.

3. What is strong reference?

  • Default reference, keeps object alive
  • Owning reference
  • Counted reference
  • Normal reference
Show answer

Answer: Default reference, keeps object alive. Strong reference increases retain count. Default. Keeps object alive. let obj = MyClass(). Most common. Potential retain cycles. Be aware of ownership.

Frequently asked questions

How many questions are in this Swift quiz?+

30 questions, with a 75-minute time limit. Every question includes a written explanation of the correct answer.

Is this Swift quiz free?+

Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.

What level is the advanced quiz aimed at?+

Master generics, memory management, concurrency, advanced patterns, and SwiftUI

Can I use this to prepare for a Swift interview?+

Yes. The questions cover the topics that come up in Swift technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.

Ready to test your Swift?

30 questions, 75 minutes. Free, no sign-up.

Start now