Google News
logo
Swift - Quiz(MCQ)
A)
Chris Lattner
B)
Vikram Adve
C)
Steve Jobs
D)
Tanya Lattner

Correct Answer : Option (A) :   Chris Lattner


Explanation : Development of Swift started in July 2010 by Chris Lattner, with the eventual collaboration of many other programmers at Apple. Swift took language ideas "from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list".

A)
June 2, 2012
B)
June 2, 2013
C)
June 2, 2014
D)
June 2, 2015

Correct Answer : Option (C) :   June 2, 2014


Explanation : Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. and the open-source community. First released in June 2, 2014, Swift was developed as a replacement for Apple's earlier programming language Objective-C, as Objective-C had been largely unchanged since the early 1980s and lacked modern language features.

A)
Arrays and integers are checked for overflow
B)
It eliminates the classes that are in an unsafe mode
C)
Switch function can be used instead of using “if” statement
D)
All of the above

Correct Answer : Option (D) :   All of the above

A)
AppKit Framework
B)
UIKit Framework
C)
Foundation Framework
D)
CoreMotion Framework

Correct Answer : Option (A) :   AppKit Framework

A)
toggle( )
B)
toggleSwitch( )
C)
onSwitch( )
D)
activateSwitch( )

Correct Answer : Option (B) :   toggleSwitch()

A)
Is a algorithmic designer tools
B)
Advanced tool to create applications
C)
A tool Used to write a pseudo code for any program
D)
Powerful programming language created by Apple

Correct Answer : Option (D) :   Powerful programming language created by Apple

A)
used in loop declaration
B)
used in function declaration
C)
used in property declaration
D)
used in parameter declaration

Correct Answer : Option (C) :   used in property declaration


Explanation : In Swift, question mark "?" is used in property declaration. It tells the compiler that this property is optional. The property may hold a value or not.

A)
You have to declare a question mark ? in the code to make a property optional
B)
You have to declare a question mark & in the code to make a property optional
C)
You have to declare a question mark ?? in the code to make a property optional
D)
None of the above

Correct Answer : Option (C) :   You have to declare a question mark ?? in the code to make a property optional


Explanation : We have to declare a question mark ?? in the code to make a property optional. If a property doesn't have a value, then the symbol ? helps to avoid the runtime error.

A)
Control
B)
Defined
C)
Parameter
D)
Closure Expression

Correct Answer : Option (D) :   Closure Expression

A)
Optional
B)
Missing
C)
Changed
D)
Necessary

Correct Answer : Option (A) :   Optional