Google News
logo
Swift - Quiz(MCQ)
What is the meaning of question mark "?" in Swift?
A)
used in loop declaration
B)
used in function declaration
C)
used in property declaration
D)
used in parameter declaration

Correct Answer :   used in property declaration


Explanation : In Swift, question mark "?" is used in property declaration. It tells the compiler that this property is optional. The property may hold a value or not.

Advertisement