Total Questions : 40
Expected Time : 40 Minutes

1. How does Swift handle memory management?

2. How is 'protocol-oriented programming' emphasized in Swift?

3. What is the purpose of the Swift 'guard' statement?

4. What is the purpose of Swift's 'extension'?

5. What is the 'escaping' keyword used for in Swift?

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

7. In Swift, how do you declare a custom error type conforming to 'Error' protocol?

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

9. What are generics in Swift?

10. How do you declare a property as 'weak' in Swift?

11. Which operator is used for equality comparison in Swift?

12. What are the benefits of using Swift Optionals?

13. Explain Swift's 'map', 'filter', and 'reduce' functions.

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

15. In Swift, how do you define a constant with a specific data type?

16. What does the 'print' function do in Swift?

17. What is the correct way to create a range of numbers from 1 to 5 in Swift?

18. Explain the concept of 'typealias' in Swift.

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

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

21. What is the purpose of Swift's 'subscript'?

22. In Swift, what is a closure?

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

24. What is a 'computed property' in Swift?

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

26. In Swift, how do you access the first element of an array?

27. In Swift, how do you handle errors using the 'try', 'catch', and 'throw' keywords?

28. In Swift, what is a 'closure'?

29. How can you define a default parameter value in a Swift function?

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

31. In Swift, what does the 'lazy' keyword indicate when used before a property?

32. What is the 'nil coalescing operator' (??) used for in Swift?

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

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

35. In Swift, how do you declare a variable without assigning a value?

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

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

38. What is the purpose of an optional in Swift?

39. What is the purpose of the 'associatedtype' keyword in Swift protocols?

40. What is the purpose of the 'map' function in Swift?