Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Swift for IOS Apple Questions #1-10 Multiple Choice QUESTION 1 1 points saved Wh

ID: 2247658 • Letter: S

Question

Swift for IOS Apple Questions #1-10 Multiple Choice

QUESTION 1 1 points saved Which of the following statements properly declarentialize a variable of type Int? Oa, var : Int=0 O b.var b 0 0 var c = Int( 12.2) O d. Int d o e. a, b and c are correct QUESTION 2 1 points Save Answer Which of the following is true for the following statement? var stringVar- "Hello" +45 O a. stringVar is created as a String data type O b. stringvar contains Hello45. c. Both a and b are correct O d. The statement does not compile QUESTION 3 1 points Save Answer Consider the following statements: var d "10" var e-atoi(d) var f = e + 10 Which of the following is true? 0 a. The second statement does not compile O b. All statements compile O c. fhas a value of 20 O d. Both b and o are correct

Explanation / Answer

QUESTION 1.d

QUESTION 2. c

String This is an ordered collection of characters. For example, "Hello, World!"

QUESTION 3. a

compilation error in second statment

QUESTION 4. d

Neither statement compiles

QUESTION 5. b

QUESTION 6. a

The correct way is given only in first statement

QUESTION 7. e

Since on appending one more element the size of the array becomes 4.Hence the 4th element can be accessed directly while append function can be use any time.

QUESTION 8. c

The function is syntactically & logically correct and returns a string.

QUESTION 9. b

Arrays are implemented as structs & hence passed by value by default to functions.Arrays can be returned from a function & since arrays are passed by value, by default they cannot be modified from inside a function.

QUESTION 10. b

Double datatype takes 8 byte for storing the values.