Swift Programming Mcqs
Q.1: In Apple Swift, which of the following operators cannot be overloaded?F
A. Assignment operator (=)
B. Ternary conditional operator (?:)!
C. Right bit shift and assign (>>=)
D. Add and assign (+=)
Q.2: In Apple Swift, which of the following options hold true?9
A. 8% 2 returns 0
B. 16 % 5 returns 1.0
C. 23 % 7.5 returns 0.5
D. -9 96 4 returns 1
Q.3: In Apple Swift, which of the following statements are correct regarding protocols?R
A. They can be used as a return type in a function.0
B. They cannot support multiple inheritance.)
C. They cannot be used as the type of a property..
D. They can be used as the type of items in a dictionary.6
Q.4: Which of the following statements are correct about properties in the Apple Swift language?[
A. In the Apple Swift language. information about a property is defined in multiple locations.a
B. An Apple Swift property does not have a corresponding instance variable.H
C. Computed properties can be defined by enumerations in the Apple Swift language.U
D. None of the above.
Q.5: ln Apple Swift. which of the following operators are right-associative?G
A. ?:
B. &&
C. &
D. ??
Q.6: In Apple Swift, which of the following variables and constants are computed lazily?S
A. Global constants
B. Local constants
C. Global variables
D. Local variables
Q.7: In Apple Swift, which of the following statements are incorrect regarding structures?U
A. Initializers can be defined by structures to set up their starting state.O
B. Methods can be defined by structures to provide functionality.D
C. Type casting enables us to verify and interpret the type of a structure instance at runtime.\
D. Reference counting permits more than one reference to a structure instance.K
Q.8: Which of the following statements are incorrect regarding a deinitializer in Apple Swift?Y
A. A deinitializer of a class is written with a 'deinit' keyword.>
B. There can be at most two deinitializers per class.2
C. A deinitializer always takes one parameter.+
D. Superclass deinitializers are always called.,
Q.9: In Apple Swift, which of the following statements are correct about extensions?O
A. They can define type methods.#
B. They can override an existing functionality.,
C. They can define new nested types, but not subscripts.5
D. They can add computed properties.!
Q.10: In Apple Swift, if an optional variable is defined without providing an initial value, then that particular variable is automatically set to which of the following?
A. zero(0)
B. nil
C. No Option
D. No Option

Related Mcqs

All Subject Mcqs