Total Questions : 20
Expected Time : 20 Minutes

1. Explain Swift's 'associatedtype' in protocols.

2. How can you achieve thread safety in Swift?

3. In Swift, how do you create an empty array of integers?

4. What is the purpose of the 'unowned' keyword in Swift?

5. What is the correct way to check if two strings are not equal in Swift?

6. What is the correct syntax for declaring a function in Swift?

7. In Swift, what is the purpose of the 'while' loop?

8. Which Swift keyword is used to start a loop?

9. Which Swift keyword is used for creating a loop?

10. What is the purpose of the 'extension' keyword in Swift?

11. Explain the concept of Swift's 'Set' type.

12. How does Swift handle multiple return values from a function?

13. Explain the concept of Swift's 'inout' parameter.

14. How does Swift handle memory management?

15. What is the purpose of Swift's 'defer' statement?

16. In Swift, how do you use a closure to sort an array of integers in ascending order?

17. What is the correct syntax for an 'if-else' statement in Swift?

18. What is the purpose of the Swift 'enum' type?

19. In Swift, how do you create a comment that spans multiple lines?

20. What is the purpose of the 'enum' keyword in Swift?