Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

17.which of these is a boolean value in swift? o a. yes / no o b. 1 / 0…

Question

17.which of these is a boolean value in swift?
o a. yes / no
o b. 1 / 0
c. true / false
o d. on / off
clear my choice
18.which keyword is used to create an array in swift?
o a. array()
b.
o c. set()
o d. dictionary()
clear my choice
19.which framework in ios handles base objects like nsstring, nsarray, nsdictionary?
o a. uikit
b. foundation
o c. core animation
o d. mapkit
clear my choice

Explanation:

Brief Explanations
  1. In Swift, the Boolean values are true and false. They are used for logical operations.
  2. In Swift, an empty array is created using square - brackets []. The array() is not the correct keyword for creating a basic array in Swift. set() is for creating sets and dictionary() is for creating dictionaries.
  3. The Foundation framework in iOS provides base objects like NSString, NSArray, NSDictionary. UIKit is for building user interfaces, Core Animation is for animations and MapKit is for maps.

Answer:

  1. C. true / false
  2. B. []
  3. B. Foundation