Iphone Flashcards
(26 cards)
What is the primary programming language used for iOS development?
Swift
True or False: Dart is the programming language used for Flutter applications.
True
Fill in the blank: In Swift, a variable declared with ‘let’ is _____ and cannot be changed.
constant
What keyword is used to define a function in Swift?
func
What is the purpose of ‘async’ and ‘await’ in Dart?
To handle asynchronous programming.
Which Swift collection type allows for duplicate values?
Array
Multiple choice: What operator is used for optional binding in Swift? A) ? B) ! C) if let D) all of the above
C) if let
True or False: Dart supports both Just-In-Time (JIT) and Ahead-Of-Time (AOT) compilation.
True
What is the syntax to declare a constant in Dart?
final or const
What does ‘nil’ represent in Swift?
A null value.
Fill in the blank: In Swift, a closure is similar to a _____ in other programming languages.
function
Which keyword is used to create a class in Dart?
class
What is the purpose of ‘guard’ in Swift?
To transfer program control out of a scope if a condition is not met.
Multiple choice: What is the default access level for properties in Swift? A) private B) internal C) public D) open
B) internal
True or False: Dart uses semicolons at the end of each statement.
True
What is the main advantage of using ‘let’ over ‘var’ in Swift?
It defines a constant that cannot be changed.
Fill in the blank: In Dart, the ‘main()’ function is the _____ of the application.
entry point
What is a tuple in Swift?
A group of values of different types.
Which method is used to convert a string to an integer in Dart?
int.parse()
Multiple choice: Which of the following is NOT a valid collection type in Swift? A) Set B) Dictionary C) List D) Array
C) List
True or False: Dart’s type system is optional.
True
What is a protocol in Swift?
A blueprint of methods, properties, and other requirements for particular tasks.
Fill in the blank: In Dart, _____ are used to define asynchronous functions.
Futures
What is the purpose of the ‘override’ keyword in Swift?
To indicate that a method is replacing a superclass method.