Iphone Flashcards

(26 cards)

1
Q

What is the primary programming language used for iOS development?

A

Swift

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: Dart is the programming language used for Flutter applications.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fill in the blank: In Swift, a variable declared with ‘let’ is _____ and cannot be changed.

A

constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What keyword is used to define a function in Swift?

A

func

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of ‘async’ and ‘await’ in Dart?

A

To handle asynchronous programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which Swift collection type allows for duplicate values?

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Multiple choice: What operator is used for optional binding in Swift? A) ? B) ! C) if let D) all of the above

A

C) if let

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: Dart supports both Just-In-Time (JIT) and Ahead-Of-Time (AOT) compilation.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the syntax to declare a constant in Dart?

A

final or const

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does ‘nil’ represent in Swift?

A

A null value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Fill in the blank: In Swift, a closure is similar to a _____ in other programming languages.

A

function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which keyword is used to create a class in Dart?

A

class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of ‘guard’ in Swift?

A

To transfer program control out of a scope if a condition is not met.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Multiple choice: What is the default access level for properties in Swift? A) private B) internal C) public D) open

A

B) internal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

True or False: Dart uses semicolons at the end of each statement.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the main advantage of using ‘let’ over ‘var’ in Swift?

A

It defines a constant that cannot be changed.

17
Q

Fill in the blank: In Dart, the ‘main()’ function is the _____ of the application.

18
Q

What is a tuple in Swift?

A

A group of values of different types.

19
Q

Which method is used to convert a string to an integer in Dart?

20
Q

Multiple choice: Which of the following is NOT a valid collection type in Swift? A) Set B) Dictionary C) List D) Array

21
Q

True or False: Dart’s type system is optional.

22
Q

What is a protocol in Swift?

A

A blueprint of methods, properties, and other requirements for particular tasks.

23
Q

Fill in the blank: In Dart, _____ are used to define asynchronous functions.

24
Q

What is the purpose of the ‘override’ keyword in Swift?

A

To indicate that a method is replacing a superclass method.

25
Multiple choice: What does the '??' operator do in Dart? A) Null check B) Default value C) Both A and B D) None of the above
C) Both A and B
26
True or False: Swift is a statically typed language.
True