Swift Basics
Variables & constants, types, optionals, closures, control flow, error handling
1What is the difference between 'let' and 'var' in Swift?
What is the difference between 'let' and 'var' in Swift?
Відповідь
let declares an immutable constant while var declares a mutable variable. A constant cannot be changed after declaration, but a variable can change value. Use let by default for safety and code clarity.
2Which data type is used to represent true or false in Swift?
Which data type is used to represent true or false in Swift?
Відповідь
The Bool type is used for boolean values true and false. It is a fundamental type in Swift used in conditionals to control execution flow. Other types serve different purposes: Int for integers, String for text, Boolean does not exist in Swift.
3What is type inference in Swift?
What is type inference in Swift?
Відповідь
Type inference allows Swift to automatically deduce a variable's type from its initial value. For example, if you assign 42, Swift infers Int. If you assign text, Swift infers String. This makes code concise without losing type safety. You can annotate explicitly if needed.
What is an optional in Swift?
How do you safely unwrap an optional using 'if let'?
+22 питань зі співбесід
Інші теми співбесід iOS
Swift Language Essentials
UIKit Fundamentals
UIViewController Lifecycle
UserDefaults & Keychain
Application Lifecycle
Auto Layout & Constraints
UITableView & UICollectionView
SwiftUI Basics
SwiftUI State Management
SwiftUI Navigation
Networking & URLSession
Codable & JSON Parsing
Core Data
Protocol Oriented Programming
MVVM Architecture
Push Notifications
Unit Testing & XCTest
UI Testing
Xcode & Build System
Swift Package Manager
Memory Management & ARC
Combine Framework
Concurrency & async/await
iOS Design Patterns
Performance Optimization
Security & Encryption
SwiftUI Advanced
iOS Application Architecture
Опануй iOS для наступної співбесіди
Отримай доступ до всіх питань, flashcards, технічних тестів, вправ code review та симуляторів співбесід.
Почни безкоштовно