Total Questions : 50
Expected Time : 50 Minutes

1. What are closures in Swift?

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

3. Which Swift keyword is used to indicate the absence of a value?

4. What is the purpose of Swift's 'Any' and 'AnyObject' types?

5. How does Swift handle memory management?

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

7. In Swift, what is the purpose of the 'defer' statement?

8. What is the purpose of the 'return' keyword in a Swift function?

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

10. Explain the use of Swift's 'lazy' keyword.

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

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

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

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

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

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

17. What are generics in Swift?

18. What is the correct way to concatenate two strings in Swift?

19. What is the purpose of the 'break' statement in a loop?

20. Which keyword is used to declare a constant in Swift?

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

22. Which Swift data type is used to store decimal numbers?

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

24. In Swift, what is a closure?

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

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

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

28. Explain the concept of protocol-oriented programming in Swift.

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

30. What is the purpose of the 'guard' statement in Swift?

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

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

33. Which Swift keyword is used to check multiple conditions in an 'if' statement?

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

35. What are the benefits of using Swift Optionals?

36. What are the benefits of using Swift's 'struct'?

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

38. Which Swift data type is used to store whole numbers?

39. Which collection type in Swift is unordered and does not allow duplicate elements?

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

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

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

43. How does Swift handle optionals and unwrapping?

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

45. In Swift, what is the purpose of the 'guard' statement?

46. How can you achieve thread safety in Swift?

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

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

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

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