Total Questions : 50
Expected Time : 50 Minutes

1. In Swift, what is the purpose of the 'subscript' keyword?

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

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

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

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

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

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

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

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

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

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

12. How does Swift handle optionals and unwrapping?

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

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

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

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

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

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

19. In Swift, what is a closure?

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

21. What is the purpose of the 'if' statement in Swift?

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

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

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

25. How can you achieve multithreading in Swift?

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

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

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

29. What are the benefits of using Swift Optionals?

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

31. How can you achieve thread safety in Swift?

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

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

34. What are generics in Swift?

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

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

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

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

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

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

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

42. How can you handle errors in Swift?

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

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

45. What is the purpose of the 'for-in' loop in Swift?

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

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

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

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

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