Wednesday, July 5, 2017

SWIFT AND iOS MCQ (Multiple Choice Questions)


iOS stands for ?

a)Internetwork Operating System
b)iPhone Operating System
c)Internet Operating System
d)None of Them

Answer: b
ios stands for iPhone operating system                      


Swift is which type of language?

A) scripting language
B) object oriented programming language
C) type safe language
D) All of the above

Ans :- D                      

Q. The IDE used in swift is____
A.  swiftc
B. gas
C. Xcode
D. Ld

Answer : C. Xcode                      

Q. In iOS, a folder with .app extension is known as Bundle.
A. True
B. False
correct ans- A. True                    


To create mutable object __ is used

A) var
B) let
C) both
D) none
Answer: A
                   

Entry Point function in swift is main()
[A]-True
[B]-False

Correct Answer-[B]



Q)Which of the following iOS frameworks is a commonly used third party Library?
a) AVFoundation.framework
b) Audiotoolbox.framework
c) AFNetwork.framework
d) CFNetwork.framework

Answer: c                      

[Q].Swift will automatically assign the data type based on the initial value?
[A].True
[B].False

Answer :[A].True                      

Q.To create contants in swift we use keyword ...
[A]let
[B]conts
[C]contants
[D]none of above

Ans :A                      

Que:- Double has a precision of at least _ decimal digits in swift.
[A] 15
[B] 20
[C] 17
[D] none of these

Ans[A]                      


Q. First IOS was written in
1984
1985
1986
1987
Answer: Option C
                   

Q.We can return multiple values in swift  from function by using?
A.Array
B.tuple
C.A&B
D.None
Ans : B
Description: we can return multiple values from function by using tuple .                      


Q1. Which of the following is incorrect data type in SWIFT ?

[A] UInt
[B] Double
[C] Char
[D] Optional

Ans.: [C] Char                      

Q.  Using tupel we can return multiple values.
A) true
B)  False
Ans: A)  True                      

Q)MAC OS X is true 64 bit unix.
A)true
B)false
ans: A) true                      

Q. If you do not want to mention external name in function call, then what should be preceded before the parameters while defining the function?

[A] ?
[B] !
[C] _
[D] \
Ans. C                      

Q: The most recent version of macOS is based on ... ?

A)WINDOWS
B)LINUX
C)UNIX
D)CMOS
Answer: C                      

QUE.To initialize variable with null require...
[A] ?
[B] !
[C] _
[D]NULL
ANS: [A] ?                      

Q) Meaning of iOS is?
(A)Integrated operating
(B)systemIntergrated open system
(C)Internetworking operating system
(D)None of above
Answer: Option C
                     

Q. What is a LLVM ?
[A] swiftc compiler
[B] objective c compiler
[C] contains both compiler (swiftc and objective c)
[D] None of the above
Ans : [C]                      

Q.Which of the following is incorrect value type of the swift?
A]Double
B]character
C]enum
D]class
Ans- D] class
                     
Q.for unwrapping value inside optional what should we use?
[A]?
[B]@
[C]!
[D]none of these
Ans-C                      

Q. . First IOS was written in
A. 1984
B. 1985
C. 1986
D. 1987
Ans: C. 1986
                     
Q. What was the original name of iOS?
A. iPad OS
B. iOS is original name
C. iPhone OS
D. iPod OS
Ans - C

Qes: what are the  features of swift programming?

[A] it eliminates entire classes of unsafe code
[B] Variables are always used before use.
[C] Arrays and integers are checked for overflow.
[D] memory is managed automatically
[E] all of the above.
ans: E : (all of the above)
exp: swift supports all above features .                      

Q.It is  possible to wrap variable  value inside  optional after unwrapping value
[A]True
[B]False
Answer:B                      

Q. Which of the following is TRUE

A.  let value = 5
      value = 10

B.  let value: Int = 0.1

C.  var value : Int?
      value = 100

D.  All the above
Ans: Option C

Explanation:

Option A is false, correct code
var value = 5
value = 10

Option B is false, correct code
let value = 0.1                      


Que. Multitasking in iOS was introduced in which version?

[a] iOS 2.0
[b] iOS 4.0
[c] iOS 6.0
[d] iOS 7.0
ans. [b] iOS 4.0                      

Q. iOS is a __software.
A. Free and open source
B. Proprietary
C. None of these
Ans : B                      


Q) Which of the following framework is not used in iOS ?
a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework -

Answer: b                      

Q]Swift will automatically assign the data type based on the intial value ?

A]True
B]False

Ans :True                      

What is Swift Programming Language?
Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.                      

What is difference between ‘let’ and ‘var’ declaration ?
constants are expressed with the ‘let’ keyword. So once assigned value can not be change, but assigned values using ‘var’ keyword can be change.

In terms of objective -c or compare with objective -c, ‘var’ is Mutable and ‘let’ is NonMutable.

let kMyConstant = 40
Or
let kMyConstant: Int = 40

var myString = “This is my string.”                      

Ques: Which of the following declares a mutable array in Swift?

A) let x =[Int]()
B)var x=[Int]
C) var x=[Int]()
D) let x=[Int]

Ans: C                      

Q.Application running in foreground but currently not receiving any events .what is the current state of Application?
A)Background state
B)Inactive state
C)Suspended state
D)Active state
Ans:b                      

Que :  Tuples as well as structs both allow  us to combine different types into one type.

 (A) true
  (B) false

Answer : A                      

Q.Which of the following framework is not used in iOS ?
a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework
And:b                      

Q) What is the element that is used to specify the type of variable or expression?
[A]Explicit Title
[B]Named Factor
[C]Type Annotation
[D]Class Annotation
And:-[C]Type Annotation                      

Q.for unwrapping value inside optional what should we use?
[A]?
[B]@
[C]!
[D]none of these
Ans-C                      


Which of the following framework is not used in iOS ?

a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework

Answer: b                      

Q. IPhone OS is based on which language?
(A)C++
(B)C
(C)  java
(D) both (i) and (ii)
Answer: D                      

Questions:
To create mutable object __ is used

A) var

B) let

C) both

D) none

Answer: A                      

1. Meaning of IOS is
A. Integrated operating system
B. Intergrated open system
C. Internetworking operating system
D. None of above
Ans:c                      

What is the latest version of iPhone operating system ?
a) 3.1
b) 8.4
c) 2.0
d)5.0

Answer - b                      

Question: Which of the following statements is/are false?
1. var is used to declare variable whose value we can change.
2. let is used to make variable as constant.

[A] 1
[B] 1 and 2
[C] 2
[D] None of the above

Correct Answer: [D] None of the above.
Justification: var is used to declare variable and let is used to make it constant.                      

Which of the following is immutable?
[ a] var num =5
[ b] num =5
[ c] let num =5
[d]all the above
Answer is :option C
let num =5 is immutable ..coz for immutable state is not changed                      


Qes: what are the  features of swift programming?

[A] it eliminates entire classes of unsafe code

[B] Variables are always used before use.

[C] Arrays and integers are checked for overflow.

[D] memory is managed automatically

[E] all of the above.

ans: E : (all of the above)
exp: swift supports all above features .                      

Q. iOS is a __software.
A. Free and open source
B. Proprietary
C. None of these
Ans : B                      

Que.What is Bundle in iOS
A. It is a class
B. It is used to send data
C  It is folder with .app extension
D. None of above
Ans. C                      


Questions:
To create mutable object __ is used

A) var

B) let

C) both

D) none

Answer: A                      

Question. Which of the following is true.
1.we can wrap unwrapped values
2. we can unwrap wrapped values
3.we cannot wrap unwrapped values
4.we cannot unwrap wrapped values
A)1,2&3
B) 2&3
C) 1&4
D)2&4
Answer. B)                      


Q.Flash Applications is  supported in iPhone browsers.Is it true?
[A]Yes
[B]No
[C]It supports flash   applications from apple only.
[D]Supports partially

Correct Answer :A
                     
What is the return type of following function?
Func myfunc( ) -->String{
return "hello"
}
ANSWER-String                      

To get value inside optional use ....?

A. ?
B. !
C. +
D. #

Ans: B                      

Q. Objective-C itself has
evolved to support ____enabling framework adoption of modern language technologies without disruption.

A) blocks

B)collection literals

C) modules

D)all of the above

Correct Answer D)                      


Q. The class files that you create for your application will have file extension ?
A - .swift

B - .m

C - .c

D- .swf

Answer: A                      

which compiler is use for swift ?
a) swiftc
b) gcc
c) clang
d)all

Answer - A                      

Que: in swift which keyword is work as immutable??

A. nil
B. var
C. let
D. enum

Ans: C. let                      

Q. In swift Variables are always initialized before use.
A. True
B. False
Answer: A                      

Q.which  keyword in swift used to initialize the variable?
A) null
B) nil
C) NIL
D)NULL
Answer. B)                      

Question : Which of the following framework is not used in iOS ?a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework
Answer: b                      

Q.We can return multiple values in swift  from function by using?
A. tuple
B. Array
C.A&B
D.None
Ans : A
Description: we can return multiple values from function by using tuple .                      



Q)Which of the following iOS frameworks is a commonly used third party Library?
a) AVFoundation.framework
b) Audiotoolbox.framework
c) AFNetwork.framework
d) CFNetwork.framework

Answer: c                      

Q. Xcode is an IDE containing a suite of software development tools developed by Apple for developing software for OS X and iOS
A. True
B. False
Ans- A. True                      


Q. Which of these are not Value type in Swift?
[A]Optional
[B]class
[C]Int
[D]struct
Answer- B class as it is of reference type                      

Q.We can return multiple values in swift  from function by using?
A.Array
B.tuple
C.A&B
D.None
Ans : B
Description: we can return multiple values from function by using tuple .                      

What is the user interface of Iphone OS called?

A)Touchwiz
B)Mobiface
C)Cocoa
D)Universal Mobile Interface

Ans : A) Touchwiz                      

Q. iOS remote push notification is introduced by apple in which version?
[A]iOS 2.0
[B]iOS 3.0;
[C]iOS 4.0;
[D]iOS 6.0;
Answer B                      


[Q] Swift is a

[A] Scripting language
[B] Object Oriented Programming Language
[C] Strictly typed checked Language
[D] Type Safe Language
[E] All of the above

Ans : [E]  All of the above                      

Q.We can return multiple values in swift  from function by using?
A.Array
B.tuple
C.A&B
D.None
Ans : B
Description: we can return multiple values from function by using tuple .                      

Q.  The -------- provides the resources you need to develop native iOS apps
A.  iOS delegate
B.  ios controller
C.  iOS SDK
D.  iOS playground
Ans C.  iOS SDK                      

Q which is not function of iOS?
A. Carrying network protocols and functions
B. Connecting high speed network
C. Providing scalability for ease of network growth and redundancy
D. Creating session between hosts in LAN
And: D                      

Q) Which of the following statements is correct about Tuple?
A. Using tuple function can return multiple values
B. Tuple is a collection of different data types
C. We can write function inside it
D. Both A and B
E. All of the above

Ans: D                      


Q. var name : String?= "CodingBull"
name=name+10

A. It's compile time error
B. It's runtime error
C. It's not an error
D. Syntax is wrong as semicolons are missing in both the line.

Ans -A                      

Q) Which of the following framework is not used in iOS ?
a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework -

Answer: b                      

What is the full form of "efi"

[A] enhanced firmware interface
[B] enhance firewall interrupt
[C] enhance firmware internet
[D] enhance fireworks interrupt

Ans is [A] enhanced firmware interface                      

Q. Which iPhone version supports flash?
A. 3.2
B. 4.2
C .both A and B
D. None
Answer: D                      


Swift was developed by
A. Chris Latter
B. Brad Cox
C. Both A & B
D. None of the above

Answer: A                      


Q.What symbol is used like a tuple to access arguments in Abbreviated Swift Closure syntax?

A) $
B) *
C) &
D) @
E) ~

Ans: A                      

Que:- general syntax for closure is_____.


[A] { (parameters) -> return type in
      Statements
      }

[B] {(return type) -> parameters in
      Statements
     }

[C] {(statements) -> parameters in
Return type
}

[D] none of these

Ans[A]                      


By default Set is treated as__
A. Array
B. Collection
C. Structure
D. None of these

Ans - A                      


Q. Which is not a function of IOS
[A]Carrying network protocols and functions
[B]Connecting high speed traffic between devices
[C]Providing scalability for ease of network growth and redundancy
[D]Creating session between hosts in LAN

Answer:- D                      


Q1. Which of the following is incorrect about Array collection?

[A] sequence matters
[B] allows duplicate values
[C] can be created implicitly
[D] none of the above

Ans.: [C]

Description.: Array collection can be created implicitly or explicitly                      

Q.Which of the following iOS frameworks is a commonly used third party Library?
a)AVFoundation.framework
b)Audiotoolbox.framework
c)AFNetwork.framework
d)CFNetwork.framework
Answer: c                      

[Q] Closure optimizations are :
[A]Inferring parameter and return value types from context.
[B]Implicit returns from single-expression closures
[C]Shorthand argument names
[D]Trailing closure syntax
[E] All of the above
Ans:E                      


Que. There are __ types of collections in Swift.

[a] 1
[b] 2
[c] 3
[d] 4

ans. [c] 3

Description : 3 types of collections are there i.e. set, array and dictionary.                      

Q. Which statement is correct in case of set?

A) we can not create set implicitly

B)we can not create set explicitly

C)we can create set explicitly as well as implicitly

D) none of the above

Ans- A)                      

Que. Which type of collection uses key-value pair in iOS?

[a] Array
[b] Set
[c] Dictionary
[d] All

Ans.: [c] Dictionary                      

Que. Which is not a type of collections in Swift.

[a] Set
[b] Array
[c] Class
[d] Dictionary

Ans. [c] Class

Explaination: Class is a reference type in Swift.                      

Q) Which statement is correct .
Difference between Set and Array is :-

(A) In Array, sequence matters but not in Set.
(B) In Array, it allows duplicate values but not in Set.
(C)In Array, it can be created implicitly or explicitly but in Set, it can be created only explicitly.
(D)All of above

Answer :- (D)                      

[Q] Swift is a

[A] Scripting language
[B] Object Oriented Programming Language
[C] Strictly typed checked Language
[D] Type Safe Language
[E] All of the above

Ans : [E]  All of the above                      


What will be the output of following program?
var array1 = [1,2,3,4,5]
var array2 = array1
array2.append(6)
var len1 = array1.count
var len2 = array2.count

print("len1 = \(len1)")
print("len2 = \(len2)")

A. 5, 6
B. 5, 5
C. 6, 6
D. 6, 5

Ans - A                      


Q) Class by default initializes the variable using public initializer method.

A] true
B] false

Ans: B] false

justification- struct and not class initializes the variable using public initializer method hy default.                      

All swift classes must inherit from which root class?
A)  not  Required
B )NSObject
C)  NSRootObject
D) @Object
Ans :B)  NSObject                      


Q. What is the name of the deinitializer in a Class declaration?

[A] dealloc
[B] release
[C] dint
[D] deinit

ANS : [D]                      

Q.In swift language by default the members of class are ..?
A.private
B.protected
C.public
D.None
Ans:C
By default the members of structure and class are public in swift language.                      

Que:  General syntax for closure is_____.

[A] { (parameters) -> return type in
      Statements
      }

[B] {(return type) -> parameters in
      Statements
     }

[C] {(statements) -> parameters in
Return type
}

[D] none of these

Ans:  A.                      

Set  by default treated as__
A. Collection
B. Structure
C. Array
D. None of these

Ans - c                      

Q.Which of the following iOS frameworks is a commonly used third party Library?
a)AVFoundation.framework
b)Audiotoolbox.framework
c)AFNetwork.framework
d)CFNetwork.framework
Answer: c                      

Q) var name : String? = "CodingBull"
name = name + 10

[A] It's compile time error
[B]It's runtime error
[C]It's not an error
[D]Syntax is wrong as semicolons are missing in both the lines.

Ans:- [A]                      
[4:31 PM, 11/10/2016] +91 94054 35628: Makarand Panat
W3

Q. What is the name of the initializer in a Class declaration?

[A] dealloc
[B] release
[C] init
[D] deinit

ANS : [C]                      


Q which xcode tool runs swift code ?

[A]console

[B] terminal

[C]debugger


[D]playgrounds

Ans [D]                      


Qs-Which of the following framework is not used in iOS ?
a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework

Answer - b                      

Q.Which of the following statement are ture for the set ?
Statement
I. sequence doesn't matter
II. does not allow duplicate value
III. Can be created only explicitly

A. Only I
B. All I,II,III
C. Only II,III
D. None

Ans. B

All above statements are true.                      
[5:43 PM, 11/10/2016] +91 90981 75551: Name - Priyesh Singh
W1
Que: which of the following loop is not a part of swift programming language?

A) for- in loop
B) while loop
C) do-while loop
D) repeat-while loop

Ans: C) do-while loop                      

Que uninitialized array can be declared implicitly true or false
A) true
B) false
Answer B) false                      

Question: Can we overload destructor in swift?
A) True
B) False
Ans.(B)
Description: In swift there is no concept of destructor                      
 Swift’s closure expressions have a clean, clear style, with optimizations that encourage brief, clutter-free syntax in common scenarios. For  These purpose which  optimizations must be included ?

A] Inferring parameter and  return value types from context

B] Implicit returns from single-expression closures

C] Shorthand argument names

D] Trailing closure syntax

E] All of above


Correct Answer [E]

‌                      

Q. Swift’s closure expressions have a clean, clear style, with optimizations that encourage brief, clutter-free syntax in common scenarios. For  These purpose which  optimizations must be included ?

A] Inferring parameter and  return value types from context

B] Implicit returns from single-expression closures

C] Shorthand argument names

D] Trailing closure syntax

E] All of above


Correct Answer [E]

‌                      

Which keyword do you use to declare enumeration?

 var
 let
 enum
 e(num)

Answer- enum                      

Que. Which one creates a dictionary with a key type of Integer and value of String?
A. var dict:[Int: String ]= ["one":1]
B. var dict:[1: "name" ]= [2:"name"2]
C. var dict:[Int: String ]= [1:"one"]
D. var dict:[String : Int ] [1:"one"]

Ans. C                      

Which of the following declares a mutable array in swift ?
1. Let x = [ Int ]()
2. Var x = [ Int ]
3. Var x = [ Int ]()
4. Let x = [ Int ]
Answer : 2                      


Q.Function types can be used as  ................... types for nesting functions.

[A]parameters types
[B]return types
[C]Both A and B
[D]None of Above

Correct Answer :C                      

Que. What is the correct way to find intersection between two Set s1 and s2 ?
A] s1.intersect(s2)
B] intersect (s1,s2)
C] Both
D]None
Ans. A                      

Which of the following is immutable?
[ a] var num =5
[ b] num =5
[ c] let num =5
[d]all the above
Answer is :option C
let num =5 is immutable ..coz for immutable state is not changed                      



Question: Which of the following statement(s) is/are correct?

1. Every instance of a type has an implicit property called self.

2. It is exactly equivalent to the instance itself.

3. self property is used to refer to the current instance within its own instance methods.

[A] 2
[B] 1, 2 and 3
[C] 2
[D] 2 and 3 Only
[E] 1 and 2 Only

Correct Answer: [B]                      


Question: Which of the following statement(s) is/are incorrect?

1. Properties associate values with a particular class, structure, or enumeration.

2. Methods are functions that are associated with a particular type.

[A] 1
[B] 2
[C] Both 1 and 2
[D] None of the above

Correct Answer: [D] None of the above

Justification: Properties associate values with a particular class, structure, or enumeration. Methods are functions that are associated with a particular type.                      

In which version apple introduce multitasking support/feature?
A ) IOS 4.0
B)iphone Os 3.0
C)iphone Os  2.0
D)iphone Os
Ans  A                      

Que. In which year Apple introduced multitasking supported iphones ?

[a] 2007
[b] 2008
[c] 2009
[d] 2010

Ans. [d] 2010
Description : In year 2010 Apple came with its first multitasking iPhone named iPhone4 (version ios 4.0)                      


Que: which version of iOS work only on iPad??

A) iOS 4.0
B) iOS 3.2
C) iOS 5.0
D) iOS 6.0

Ans: B                      

Q.Type casting in Swift is implemented with the__ operator.
[A]is

[B]as

[C]Both [A]&  [B]

[D] None of the above

Correct Answer [C]                      

Flash Applications is  supported in iPhone browsers.Is it true?
a)Yes
b)No
c)It supports flash applications from apple only.
d)Supports partially

Answer: a                      


Q.Which of the following statement is wrong?
[A]IBOutlet are macro defined to denote a variable  that can be referred to in Interface Builder.
[B]IBOutlet resolves to Id
[C]IBOutlet resolves to nothing
[D]IBOutlet is a type qualifier used by Interface Builder as a connection point for sending messages from app code to a user interface element
Corect Answer: C                      

Which of the following framework is not used in iOS ?

a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework

Answer : b , Appkit Framework                      

Question: To make connection with interface builder which keyword is used?
A) IBinder
B)IBAction
C)IBOutlet
D)none of these

Ans.(C)                      

Q. To switch from one view controller to another , the concept of segueway is used.

A) true

B) false

Ans- A) true.                      

Q. To switch from one viewController  to another , the method use is presentViewController()  is used.

A) true

B) false

Ans- A) true.                      


Question: ARC stands for _ _ _ _ _.
 [A] Automatic Reference Counting
 [B] Automatic Referenced Counting
 [C] Automatic Referenced Counter
 [D] Auto Referred Counting

Correct Answer: [A]                      

Which of the following statement is wrong ?
a)IBAction is a type qualifier used by IB to enable connection user experience elements and app code.
b)IBAction resolves to void
c)IBAction is a macro defined to denote a method that can be referred to in Interface Builder.
d)None of them
Answer: d                      

W2
Question: which key is use to emulate gesture in ios?
A) command key
B) option key
 Answer B)                      

W3
Q.We can return multiple values in swift  from function by using?
A.Array
B.tuple
C.A&B
D.None
Ans : B
Description: we can return multiple values from function by using tuple .                      
 used to connect button with function.
 A: @IBOutlet.                                          
  B:@IBAction.                                
 C:@IBinder.                                    
D:none of the above.                        
Ans:B                      

Q.Multitasking in iOS was introduced in which version?
a)iOS 2.0
b)iOS 4.0
c)iOS 6.0
d)iOS 7.0

Answer: b                      

The Iphone has a feature that activates when you rotate the device from portrait to landscape.
   A. Rotator
  B. Accelerometer (Correct Answer)
  C. Shadow detector
  D. Special Sensor
Ans: B                      

Q :- which property is used in iOS to set hint?

A) UILabel
B) UITextView
C) Placeholder
D) UITextfield

Ans :- C) Placeholder                      

Q :- ___  is used to mask the password?

A) secure text entry
B) placeholder
C) define content
D) none of the above

Ans :- A) secure text entry                      

Que: What is "Ib" in IBOutlet?
A. Interface Builder
B. Intent builder
C. Internet Builder
D. None of the above

Ans: A                      

Q) In which year multitasking was introduced?
A.2009
B.2010
C.2011
D.2012

Ans: B                      

Question
Which one of the  below functions definitions is wrong considering Swift language?

 A-func haveChar(#string: String, character: Character) -> (Bool)

 B-func mean(numbers: Double...) -> Double

C- func minMax(array: [Int]) -> (min: Int, max: Int)?

 D- func minMax(array: [Int])  -> (min: Int?, max: Int?)

Answer: C                      
[2:20 PM, 11/11/2016] +91 77096 22579: Name Tejaswini Patil
Group w1
Q.By defult instantiateViewControllerWithIdentifire return object of...
[A]UIViewController
[B]UIView
[C]String?
[D]none above

Ans:A                      


Q. What was the original name of iOS?

A. iPad OS
B. iOS is original name
C. iPhone OS
D. iPod OS

Ans - C                      

Q.Which of the following iOS frameworks is a commonly used third party Library? a)AVFoundation.framework b)Audiotoolbox.framework c)AFNetwork.framework d)CFNetwork.framework Answer: C                      


Que:  General syntax for closure is_____.

[A] { (parameters) -> return type in
      Statements
      }

[B] {(return type) -> parameters in
      Statements
     }

[C] {(statements) -> parameters in
Return type
}

[D] none of these

Ans:  A.                      

Q In view controller which is by default model transition style?
A) partial curl
B)flip cover
C) cross cover
D)cover vertical
Answer: D                      


Q. First IOS was written in
A. 1984
B. 1985
C. 1986
D. 1987

Ans-C. 1986                      

Que.
There are __ types of collections in Swift.

[a] 1
[b] 2
[c] 3
[d] 4

Ans. [c] 3

Description :
3 types of collections are there i.e. set, array and dictionary.                      


Q.Which of the following statement is true for iOS Storyboards?

[A] Introduced in iOS5
[B] Save lot of time required for building user interface of apps
[C]It can describe segue between various scenes
[D] All of the above

Answer: [D] All of the above                      

Q1.What is role of init( )?

[A] To create an initial value

[B] To assign default property value within the property definition

[C] To initialize an instance for particular data type

[D] All of the above.

Ans: [D] all of the above.                      


Q)Which of the following is a default UI property?
a)assign
b)non-atomic
c)atomic
d)None of them
Answer : C                      

Que:- the protocol that defines a text fields delegate is called _____.


[A] UITtextfieldDelegate

[B] UITtextfield

[C]UIF

[D] none of these

Ans[A]                      

Que:- ios apps are based on ____.


[A] event-driven programming

[B] Activity-driven programming

[C]storyboard-driven programming

[D] none of these

Ans[A]                      

Que. All Swift classes must inherit from which root class?
A. Not Required
B. Nd Object
C. NsRootObject
D.@Object

Ans. A Not Required                      


Question- What is the iOS version launched by apple with iPhone 5S ?

A) iOS 6
B) iOS 7
C) iOS 8
D) iOS 9

Answer- B                      

Q) To make connection with interface builder which keyword is used?
A) IBinder
B)IBAction
C)IBOutlet
D)none of these

Ans.(C)                      

Q. Which User Mode Has limited Monitoring commands in iOS??
A. User EXEC mode
B. Privileged EXEC mode
C. Specific Configuration Mode
D. Setup Mode

ANS: A.                      


Q. what does the  "s" stand for in iPhone 4s,5s,6s  ?

[A] standard
[B] speed
[C] storage
[D] screen

Ans: B                      

Q)Which of the following statement is wrong ?
 a)IBAction is a type qualifier used by IB to enable connection user experience elements and app code.
 b)IBAction resolves to void
 c)IBAction is a macro defined to denote a method that can be referred to in Interface Builder.
d)None of them
Answer:d                      


Q.To expose function into Interface Builder we use ?

A. IBAction
B. IBOutlet
C. segue
D. none of these

Ans:
A. IBAction                      

W3
Q.  How to add UI elements.
[A] using interface  builder
[B] using code
[C]Both [A] and [B]
[D] none
Correct answer: [C]                      

W3
Q. First IOS was written in
A.  1984
B.  1985
C.  1986
D.  1987
Ans c                      

Group: W1

Q: Which property is used in iOS to set hint?

A) UILabel
B) UITextView
C)UITextfield
D) Placeholder

Ans :- D) Placeholder                      

Group: W1


Q: How to set splash screen in your iOS app?

A) It is automatically set
B) Explicitly set
C) None
D) Both

Ans :- A                      

Que. In which year Apple introduced multitasking supported iphones ?

[a] 2007
[b] 2008
[c] 2009
[d] 2010

Ans. [d] 2010
Description : In year 2010 Apple came with its first multitasking iPhone named iPhone4 (version ios 4.0)                      

Which keyword do you use to declare enumeration?

 var
 let
 enum
 e(num)

Answer- enum                      


Q)Which of the following is a default UI property?
a)assign
b)non-atomic
c)atomic
d)None of them
Answer : C                      

Que: which of the following loop is not a part of swift programming language?

A) for- in loop
B) while loop
C) do-while loop
D) repeat-while loop

Ans: C) do-while loop                      

which compiler is use for swift ?

a) swiftc
b) gcc
c) clang
d) none

Answer - A                      

Q. What is default animation for view controller?
A.CoverVertical
B.Crossdisolve
C.FlipHorizontal
D.PartialCurl
Ans:A.CoverVertical is by default animation for view controller.                      


Ques:Every UIView Class in ios Subclass of
[A] UIViewController
[B] UiViewAction
[C] UIAction
[D] None of Above

Answer-[A]                      


Q1. What are the animations in UI MODEL TRANSITION STYLE ?

[A] cross dissolve
[B] cover vertical
[C] flip horizontal
[D] All of the above

Ans.: [D]                      


Q)Which of the following is a default UI property?

a)assign
b)non-atomic
c)atomic
d)None of them
Answer : C                      

Q. InstantaiteViewControllerWithIdentifier() this method return object of...

A) viewController

B) UIViewController

C)UIViewController which is optional

D)none
Ans- C

Above method always return the object of base class is view controller which is optional                      

[Q]which of the following are main responsibilities of view controller?
[A]Updating the contents of the views, usually in response to changes to the underlying data.
[B]Responding to user interactions with views.
[C]Resizing views and managing the layout of the overall interface.
[D]All of the above.
Ans:-                      

[Q].UIAlertController is inherited from UIViewController ?
[A].True
[B].False

Answer: [A].True                      

Q. version of Ios for first iPad is ...........

[A]ios 2.0
[B]ios3.0
[C]ios 3.2
[D]ios 4.0


Ans [C]
Explaination :- ios 3.2 is a spacial version of ios which is developed for iPad 1g in 2010                      


Q. In which version of iOS multitasking is introduced?

A) iPhoneOS 3.0
B) iOS 9.0
C) iOS 4.0
D) iPhoneOS

Ans: C                      

Que:- ios apps are based on ____.


[A] event-driven programming

[B] Activity-driven programming

[C]storyboard-driven programming

[D] none of these

Ans[A]                      

Q)The iPhone has a feature that activates when you rotate the device from portrait to landscape.

(A)Rotator
(B)Accelerometer
(C)Shadow detector
(D)Special Sensor

Answer: Option B                      


Que: Multitasking for iOS was first released in which year?
A. 2010
B. 2012
C. 2007
D. 2015

Answer:  A. 2010                      

Q.We can return multiple values in swift  from function by using?
A)Array
B)tuple
C)A&B
D)None
Ans : B                      


Q.  To access documentation, hold down ___ while clicking a class you want to view.

A.  Control
B.  Option+Command
C.  Option
D.  Command

Ans: C.

Hold Option key and click on what you want to view.                      


Q. Which type of class object is returned by method  "storyBoard.instantiateViewControllerWithIdentifier()" ?

[A] UIViewController

[B] Object of Subclass of UIViewController

[C] return nothing

[D] none of the above


ANS : [A]                      

Que: which of the following is a default UI property?

 (A) assign
 (B) non atomic
(C) atomic                                        
(D) none of them
Answer : C                      

Q: The most recent version of macOS is based on ... ?

A)WINDOWS
B)LINUX
C)UNIX
D)CMOS

Answer: C                      

Info.plist is application configuration file inside ios??
A]True
B]False

Ans->True                      

Q. InstantaiteViewControllerWithIdentifier() this method return object of...

A) viewController

B) UIViewController

C)UIViewController which is optional

D)none
Ans- C                      

Q) Application is in background. Not executing any code. What is the current application state?
A. Inactive state
B. Active state
C. Background state
D. Suspended state

Answer: D                      

Q.Which of the following iOS frameworks is a commonly used third party Library?
a)AVFoundation.framework
b)Audiotoolbox.framework
c)AFNetwork.framework
d)CFNetwork.framework
Answer: c                      

Q. Which choice is the output value of the following code
Var a = 0
let b = ++a
let c = a++
"Print "(\(a)\(b)\(c))

[A]  2 0 2
[B] 2 1 2
[C] 2 0 1
[D] 2 1 1

Ans: D                      

Q.ARC in swift is functionally similar to destructor
A.True
B.False
Ans True                      

Que. Uninitialized array can be declared implicitly true or false
A) true
B) false
Answer B) false                      


Storyboard is used as UI designing file inside Ios?
A- True
B -False
ans-> True                      

Q. IBActikn and IBOutlet are macros defined to denote variables and method that can be referred in interface Builder.

A)True
B) False
Ans: A) True...                      

Which of the among class is super class of view controller objects?
A. UIViewController
B. AlertVierController
C. UICollectionView
D. None of the above

Ans.- A                      

Q)In Swift there are two kinds of types: named and __.

[A] Strong
[B] Compound
[C] Arrays
[D] Filtered
Ans: [B]                      

Questions:
IBOutlet is used to create functions of UIfield?

A) false

B)true

Answer:A

Explanation:
IBOutlet is used to create reference of UIfield                                              

Quest- Which of the following is not a part of  life cycle of iOS
[A]-ViewDidAppear
[B]-viewWillAppear
[C]-ViewDidDisappear
[D]-viewWillRestart

Answer-[D]
Explanation-there is no such method/function viewWillRestart in iOs                      

Question: Which of the following function returns the table cell at the specified index path?

[A] func cellForRow(at: IndexPath)
[B] func indexPath(for: UITableViewCell)
[C] func indexPathForRow(at: CGPoint)
[D] var visibleCells: [UITableViewCell]

Correct Answer: [A] func cellForRow(at: IndexPath)                      


Question: Which of the following function returns an index path representing the row and section of a given table-view cell.
[A] func cellForRow(at: IndexPath)
[B] func indexPath(for: UITableViewCell)
[C] func indexPathForRow(at: CGPoint)
[D] var visibleCells: [UITableViewCell]

Correct Answer: [B] func indexPath(for: UITableViewCell)                      


Q. onDestroy() method in Android activity life cycle is similar to___ method in iOS viewController life cycle.

A) init()
B) viewDidLoad()
C) deinit()
D) none

Ans.- C)                      

Ques :- which of the following method is called only once in iOS viewController life cycle?

A) viewWillAppear( )
B) viewDidLoad( )
C) viewWillDisappear( )
D) viewDidAppear( )

Ans :- B) viewDidLoad( )                      

Que:- ___ helps us to navigate among many ViewController.

A) InputViewController
B) BaseViewController
C) Navigation Controller
D) ViewController

Ans :- C) Navigation Controller                      

Does the Iphone browser support flash applications?
A. Yes (Correct Answer)
B. No
C. Just the flash applications from apple
D. Some of them [the simpliest]
Ans: A                      

Que:- ios method for onStart() is???
[A] ViewWillAppear()
[B]ViewDidAppear()
[C]ViewDidDisapper()
[D] none of these
Ans[A]                      

Q: which one of the below functions definitions is wrong considering swift language?
A. func haveChar(#string: String, character: Character) -> (Bool)
B. func mean(numbers: Double...) -> Double
C. func minMax(array: [Int]) -> (min: Int, max: Int)?
D. func minMax(array: [Int]) -> (min: Int?, max: Int?)
Ans:
A[2:

Q) Which of the following is a property of TableView?
[A]rowHeight
[B]sectionFooterHeight
[C]sectionHeaderHeight
[D]separatorColor
[E] All of the above
Answer [E]                      

What is true about UIViewTable Section?
[A] atleast 2 sections be present in UIViewTable
[ B ]not necessary to write any Section
[ c] at least one 1 section must present in UItabel
[D] none of the above

Answer : C at least one Section must present in UITable                      

Q:-The application has not been launched or was running but terminated by the device.Determine the current state of App.
a)Suspended state
b)Background state
c)Inactive state
d)Not running state

Ans:-(d)                      

Q)Which of the following is a default UI property?
a)assign
b)non-atomic
c)atomic
d)None of them
Answer : c) atomic                      

Question- Which of the following framework is not used in iOS ?
a)UIKit Framework
b)AppKit Framework
c)Foundation Framework
d)CoreMotion Framework
Answer- b                      


Q. Which is the content of UITableViewCell ?

[A] image view
[B]text label
[C]accessory type
[D] all of above

Ans :- [D] all of above
Explanation :-  UITableViewCell contains image view , text label and accessory type                      

Which is the wrong definition of a protocol in Swift?
A. protocol SomeProtocol { var first: Int{ get } }
B. protocol SomeProtocol { var first: Int{ set } }
C. protocol SomeProtocol { var first: Int { get set } }
D. protocol SomeProtocol { var first: Int { get set } var second: Int { get } }

 Answer: A                      

Which of these could be an appropriate protocol declaration in Swift?
Answer:
A] @objc protocol someProtocal { optional var first: Int { get } }
B] @objc protocol someProtocal { optional var first: Int { set } }
C] protocol someProtocal { optional var first: Int { get }
 D] protocol someProtocal { var first: Int { set } }

Ans: A          

Q. Who calls the main function of app during the app launch cycle?
A. UIKit framework
B. UIApplication
C. UIViewController
D. None of these

Ans- A{ UIKit framework }                      

Q. What is protocol in swift?
A.Interface in Java
B.Class in Java
C.collection  in Java
D.all
Ans:A.Interface  in java is called  as protocol  in swift.                      


Q. Which framework delivers event to custom object when app is in foreground?

A. PushKit Framework

B. Twitter Framework

C. UIKit Framework

D. GameKit Framework

Answer: C. UIkit Framework                      

[Q]Where you can use protocol as a type?
[A]As a parameter type or return type in a function, method or initializer.
[B]As the type 9f a constant, variable or property.
[C]As the type of items in an array, dictionary or other container.
[D]All of the above
Ans:- All of the above                      

Quest- All view in iOs   derived from
[A]-View
[B]-UIView
[C]-UIViewlabel
[D]-None of Above

Answer-[B]                      

Que : what is the extension of compiled version of main.storyboard file??

A.  .xib
B.  .nib
C.  .IProj
D.  .swift

Ans : C (.IProj)                      

Q.What is the full form of XIB?

[A] XML interface builder
[B] extensible interface builder
[C] extra internet board
[D]XML interference builder

Ans:-   A                      

Q:Which of the following statement is wrong ?
[a]IBAction is a type qualifier used by IB to enable connection user experience elements and app code.
[b]IBAction resolves to void
[c]IBAction is a macro defined to denote a method that can be referred to in Interface Builder.
[d]None of them
Answer:[ d]                      

Q. to switch from one viewController  to another , the method use is presentViewController()  is used
A) true
B) false
Ans- A) true.                      

Question- Which of the following iOS frameworks is a commonly used third party Library?

a)AVFoundation.framewor

b)Audiotoolbox.framework

c)AFNetwork.framework

d)CFNetwork.framework

Answer- c                      

Question: Which of the following class implements the behavior of scrollable, multiline text region.

[A] UITextView
[B] UILabel
[C] UITextField
[D] UILabel

Correct Answer: [A] UITextView                      

Q:-)Multitasking in iOS was introduced in which version?
(a) iOS 2.0
(b) iOS 4.0
(c) iOS 6.0
(d) iOS 7.0

Ans:-(b)

7 comments:

  1. One of the key features said to be coming to
    the HomePod is the ability to make or receive phone calls
    Read More At iOS Swift Online Training

    ReplyDelete
  2. Really helpful for revision of DMC students.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Great. What an amazing website .What does American citizen need visa for Turkey. Yes, Of course the USA citizens are not included in the list of those countries which do not require a visa to visit Turkey. and the Turkish government of Turkish Also introduced a fast and special visa system to attract more US citizens

    ReplyDelete
  5. wonderful post operating system is a heart of the computer system...
    act as an mediator..
    i have one more information related this post.. ccgenerator

    ReplyDelete

SWIFT AND iOS MCQ (Multiple Choice Questions) iOS stands for ? a)Internetwork Operating System b)iPhone Operating System c)Internet ...