Home / CSE MCQs / Swift ::

CSE MCQs :: Swift

  1. What are the characteristics of Switch in Swift?
  2. A.
    It supports any kind of data, and not only synchronize but also checks for equality
    B.
    When a case is matched in switch, the program exists from the switch case and does not continue checking next cases. So you don't need to explicitly break out the switch at the end of case
    C.
    Switch statement must be exhaustive, which means that you have to cover all possible values for your variable
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. How do you declare an Iboutlet property?
  4. A.
    IBOutlet var button:UIButton
    B.
    var button:UIButton(IBOutlet)
    C.
    var button:UIButtonoutlet
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What are the features of Swift Programming?
  6. A.
    It eliminates entire classes of unsafe code
    B.
    Variables are always initialized before use
    C.
    Arrays and integers are checked for overflow
    D.
    All of these

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What are the control transfer statements used in Swift?
  8. A.
    Continue
    B.
    Break
    C.
    Fallthrough
    D.
    All of these

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What are the advantages of Swift?
  10. A.
    Swift is safe
    B.
    Swift is fast
    C.
    Swift is open source
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. What's are the new features in Swift 4.0?
  12. A.
    Faster, easier to use Strings that retain Unicode correctness
    B.
    Smart key paths for type-safe, efficient, extensible key value coding for Swift types
    C.
    Added some enhancements to creating dictionary and Set types
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. What type of integer is denoted by "Int8"?
  14. A.
    Open
    B.
    Signed
    C.
    Unsigned
    D.
    Close

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Given : var stringValue:String = "Justin Gif. What is the result of stringValue = nil?
  16. A.
    stringValue == nil
    B.
    stringValue == Justin Gif"
    C.
    the compiler won't allow it
    D.
    None

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. What are the collection types in Swift?
  18. A.
    Dictionary and array
    B.
    Array and library
    C.
    Dictionary and library
    D.
    Library, dictionary and array

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Swift is which type of language?
  20. A.
    scripting language
    B.
    object-oriented programming language
    C.
    type safe language
    D.
    All of the above

    View Answer

    Workspace

    Discuss Discuss in Forum