QUESTION IMAGE
Question
18.which keyword is used to create an array in swift?
a. array()
b.
c. set()
d. dictionary()
clear my choice
19.which framework in ios handles base objects like nsstring, nsarray, nsdictionary?
a. uikit
b. foundation
c. core animation
d. mapkit
clear my choice
20.what is the result of print(10 % 3) in swift?
a. 3
b. 1
c. 10
d. 0
clear my choice
Brief Explanations
- In Swift, an empty array is created using square - brackets
[].array()is not the correct keyword for creating an array in Swift.set()is used for creating sets anddictionary()is for creating dictionaries. - The Foundation framework in iOS handles base objects like
NSString,NSArray,NSDictionary.UIKitis mainly for building user interfaces,Core Animationis for animations andMapKitis for maps. - In Swift, the
%operator is the modulo operator. When 10 is divided by 3, the quotient is 3 and the remainder is 1. So10 % 3equals 1.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
- B. []
- B. Foundation
- B. 1