Skip to content

Latest commit

 

History

History
101 lines (66 loc) · 2.77 KB

Properties_Initializers.md

File metadata and controls

101 lines (66 loc) · 2.77 KB

Swift Properties and Initializers Interview Questions (Beginner to Advanced)

Beginner Level

  1. What are stored properties in Swift?
    Answer coming soon...

  2. What are computed properties?
    Answer coming soon...

  3. What is a lazy property in Swift, and how does it work?
    Answer coming soon...

  4. What is the difference between let and var properties?
    Answer coming soon...

  5. What is the purpose of property observers (willSet, didSet)?
    Answer coming soon...

  6. How do default property values work in Swift?
    Answer coming soon...

  7. What is the self keyword in Swift?
    Answer coming soon...

  8. What is a failable initializer, and when would you use it?
    Answer coming soon...

  9. How do you create a constant property in a class or struct?
    Answer coming soon...

  10. How do you define a custom initializer in Swift?
    Answer coming soon...


Intermediate Level

  1. What is a static property in Swift?
    Answer coming soon...

  2. What is a type property, and how does it differ from an instance property?
    Answer coming soon...

  3. Explain the concept of key paths in Swift.
    Answer coming soon...

  4. How can you prevent a property from being modified?
    Answer coming soon...

  5. What is a default memberwise initializer?
    Answer coming soon...

  6. How do you create a convenience initializer?
    Answer coming soon...

  7. What is the role of required in initializers?
    Answer coming soon...

  8. How do you ensure initialization of all properties in a class?
    Answer coming soon...

  9. Can an initializer call another initializer?
    Answer coming soon...

  10. What are access control levels for properties in Swift (public, private, etc.)?
    Answer coming soon...


Advanced Level

  1. What are lazy properties, and when should you use them?
    Answer coming soon...

  2. How do property wrappers work in Swift?
    Answer coming soon...

  3. How do you create custom property observers?
    Answer coming soon...

  4. What is dependency injection, and how can initializers help with that?
    Answer coming soon...

  5. What is copy-on-write optimization in properties?
    Answer coming soon...

  6. Can you override a property’s getter and setter in a subclass?
    Answer coming soon...

  7. How do reference and value types handle properties differently?
    Answer coming soon...

  8. What is @NSManaged in Core Data properties?
    Answer coming soon...

  9. How do you use @propertyWrapper to create reusable code?
    Answer coming soon...

  10. How can lazy var impact memory management?
    Answer coming soon...