Swift MCQ Questions & Answers - Mobile Development

Swift MCQs : This section focuses on "Swift" in Mobile Development. These Multiple Choice Questions (MCQ) should be practiced to improve the Swift skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. Which of the following is true about Swift?

A. Swift is an open-source programming language
B. Swift is used in iOS development
C. Swift can be compiled as a dynamic framework
D. All of the above

View Answer


2. Swift is an open-source programming language developed by?

A. Google
B. Facebook
C. Apple
D. IBM

View Answer


3. What is the meaning of question mark "?" in Swift?

A. used in function declaration
B. used in property declaration
C. used in loop declaration
D. used in parameter declaration

View Answer


4. How can you make a property optional in Swift?

A. You have to declare a question mark & in the code to make a property optional
B. You have to declare a question mark ? in the code to make a property optional
C. You have to declare a question mark ?? in the code to make a property optional
D. None of the above

View Answer


5. Which operator specifies a range between two values a and b (a

A. full open range
B. half close range
C. full close range
D. half open range

View Answer


6. In Swift4, functions can be categorized in __________ types.

A. 1
B. 2
C. 3
D. 4

View Answer


7. A function inside a function is called a nested function in swift?

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


8. ________________ is a hierarchy of objects that obtain the opportunity to respond to the events.

A. Regular Expression
B. Dictionary
C. Responder Chain
D. None of the above

View Answer


9. Enum is also known as Swift Enumeration.

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer


10. Constants are declared by using _____ keyword and variables by _______ keyword.

A. var, let
B. let, let
C. var, var
D. let, var

View Answer


11. Which of the following is not a literals in swift?

A. Binary Literals
B. Quad Literals
C. Hexadecimal Literals
D. Decimal Literals

View Answer


12. Numbers with decimal values or fractional components are called?

A. decimal number
B. integer number
C. floating numbers
D. All of the above

View Answer


13. Which of the following features of Swift programming language?

A. Swift is very easy to learn and precise to use
B. Automatic memory management
C. Swift follows Objective-C like syntax
D. All of the above

View Answer


14. In Swift programming language, single-line comments are started with ___________?

A. single slashes
B. double slashes
C. asterisk
D. hash

View Answer


15. _____________ is a process of querying and calling properties

A. Lazy Chaining
B. Swift Chaining
C. Optional Chaining
D. All of the above

View Answer


16. How many types of classes in Inheritance in Swift?

A. 1
B. 2
C. 3
D. 4

View Answer


17. How many varieties of collection types in Swift?

A. 2
B. 3
C. 4
D. 5

View Answer


18. Which Of The Following Is Incorrect Data Type In SWIFT ?

A. UInt
B. Double
C. Char
D. Optional

View Answer


19. Which Of The Following Is Incorrect Value Type Of The Swift?

A. Double
B. Character
C. Enum
D. Class

View Answer


20. The class which inherits the properties from other class is called child class or sub class.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer





Discussion



* You must be logged in to add comment.