iOS Technical Test MCQs

iOS Technical Test MCQs

These iOS Technical Test multiple-choice questions and their answers will help you strengthen your grip on the subject of iOS Technical Test. You can prepare for an upcoming exam or job interview with these iOS Technical Test MCQs.
So scroll down and start answering.

1: True or False? When you create a new iOS project from a template, the template automatically makes a controller object for you.

A.   FALSE

B.   True

2: When adding objects to NSMutableDictionary, the key...

A.   Must be a string literal

B.   Must conform to the NSCopying protocol

C.   Must be wither an NSString or an NSNumber

D.   Can be any object

3: Which of the following code snippets would work for changing the position of a view?

A.   (none of these)

B.   view.frame.size.x = 0; view.frame.size.y = 100;

C.   view.frame.x = 0; view.frame.y = 100;

D.   CGPoint center = view.center; center.x = 0; center.y = 100; view.center = center;

4: What data type do you initialize if you want a list of items that can change?

A.   NSMutableArray

B.   NSMutableDictionary

C.   NSArray

D.   NSDictionary

5: What data object can store a timestamp the best?

A.   NSString

B.   NSNumber

C.   NSDate

D.   NSArray

6: Difference between a frame and bounds?

A.   Bounds origin is always (0, 0), a frame origin is relative to his container view

B.   It's the same

C.   Frame is for UIKit objects, bounds are for CoreGraphics.

7: What file contains configuration data for the app?

A.   Main.m

B.   config.m

C.   Info.plist

D.   AppDelegate.h

8: How do you reference your app bundle?

A.   app.io

B.   self.bundle

C.   self.app.fileSystem

D.   [NSBundle mainBundle]

9: What function is called for each cell in a Table View?

A.   viewWillLoad

B.   cellDidAppear

C.   cellForRowAtIndexPath

D.   viewDidLoad

10: Which of the following keyboard shortcuts will run your app on the simulator?

A.   Command-A

B.   Command-P

C.   Command-R

D.   Command-G

11: What's the difference between NSArray and NSMutableArray?

A.   NSMutableArrayʼs contents can not be modified once itʼs been created whereas a NSArray can be modified as needed

B.   NSArray is an abstractClass class and NSMutableArray is a protocol

C.   NSArrayʼs contents can not be modified once itʼs been created whereas a NSMutableArray can be modified as needed

D.   NSArray has a limited capacity of 256 items where as NSMutableArray is unlimited

12: What is @2x used for?

A.   Retina Assets

B.   NSStrings

C.   All Images

D.   Normal Assets

13: Which of the following symbols do you prefix a character string with when you want a hard coded string?

A.   @

B.   *

C.   #

D.   &

14: ARC Stands for:

A.   Allocated Reference Cycles

B.   Automatic Reference Counting

C.   Autoreleased Reference Counters

D.   Automatic Retained Collections

15: The archive that holds the saved create and configure view objects is known as:

A.   XML

B.   XID

C.   XBI

D.   XIB

16: What data type do you initialize if you want a string that can change?

A.   NSString

B.   NSMutableString

C.   NSChangeableString

D.   NSCore

17: True or False: A Collection View is another name for a tableView

A.   False

B.   True

18: True or False: The main thread handles touch inputs

A.   True

B.   False

19: If an asset is for iPad only, how do you specify it in the file name?

A.   ~iPhone

B.   ~iPad

C.   !iPhone

D.   !iPad

20: An indexPath has a Section and a ____

A.   Grid

B.   Row or item

C.   Column

D.   Coordinate

21: What is the function in Objective C that determines what is in the cells of a tableView?

A.   cellForRowAtIndexPath

B.   cellForTableView

C.   tableViewCellContents

D.   tableView.cell.content

22: In manual memory management, what do you do when you don't need a reference on a object ?

A.   [obj release];

B.   free(obj)

C.   [obj dealloc]

D.   [obj free]

23: Which of the following objects is visible to the user?

A.   View objects

B.   Model objects

C.   None of these

D.   Controller objects

24: True or False: viewDidLoad comes after viewDidAppear?

A.   False

B.   True

25: When using ARC, how do you destroy an object in Objective C?

A.   Set the variable that points at it to 1

B.   All of these

C.   Set the variable that points at it to nil

D.   Set the variable that points at it to 0

26: Is it possible to make a full application without using Interface Builder?

A.   Yes, but only for iPad

B.   Yes, on any platform

C.   No, you always have to use Interface Builder to meet Apple's app standards

27: If you use threading, on which thread should UI Transitions be called?

A.   The main thread

B.   The background thread

C.   Concurrent threads

D.   Any thread

28: What structure can hold an x and y coordinate that defines a location?

A.   CGSize

B.   CGPoint

C.   CGRect

D.   NSFrame

29: What is the difference between Cocoa and Cocoa Touch?

A.   Cocoa Touch is another name for a Cocoa framework

B.   Cocoa Touch is the application framework for developing applications in Mac OS X. Cocoa is the application framework for iPhone,iPad and iPod Touch .

C.   Cocoa is the application framework for developing applications in Mac OS X. Cocoa Touch is the application framework for iPhone,iPad and iPod Touch .

30: What function do you call to close the current view and go back to the root?

A.   popToRootViewController

B.   closeCurrentView

C.   popToMainViewController

D.   pushRootViewController

31: What is a category?

A.   A namespace

B.   A category is a way to add methods to a class which already exists

C.   A group of classes

D.   A way to add instance variables to a class which already exists

32: In ARC enabled project: [someObject release];

A.   Compile error

B.   Nothing will do

C.   Crash on run time

D.   Some time crash some time run well

33: +(void)doSomething{}

A.   Is a instance method

B.   Both true

C.   Is a class method

D.   both false

34: What can be linked to an Obj-C program without any particular process?

A.   Java jar files

B.   scripts

C.   C++ libraries

D.   executables

35: What is the difference between NSInteger and int?

A.   NSInteger is long int and int is just int

B.   They are the same

36: Which of the following holds data and knows nothing about the user interface?

A.   Controller objects

B.   View objects

C.   Model objects

D.   All of these

37: When do you use the "assign" value for a property?

A.   Never. It should always be either: atomic, nonatomic, strong or weak

B.   For primitive values such as BOOLs or NSIntegers

C.   On strings

D.   On arrays and dictionaries

38: What do you use to expose preferences for your app in the Settings section of the device?

A.   settings.m

B.   Settings.bundle

C.   NSSetting

D.   Variables.bundle

39: In order to test your application in XCode, which testing frameworks are available?

A.   MinUnit, IOSUnit

B.   (all of these)

C.   Tes.ting

D.   NUnit, JUnit

E.   OCMock, OCUnit, XCTest

40: What structure can be used to define a portion of a series?

A.   NSString

B.   NSRange

C.   NSSet

D.   CGPoint

41: What class supports the sharing of small amounts of data such as strings or dates to iCloud?

A.   NSUbiquitousKeyValueStore

B.   NSUrlConnection

C.   NSOperation

42: How can you make the following code display with rounded corners? UIView *rectView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; rectView.backgroundColor = [UIColor redColor]; rectView.layer.cornerRadius = 8; [self.view addSubview:rectView];

A.   rectView.roundedCornersVisible = YES;

B.   [rectView drawRect:rectView.bounds];

C.   rectView.layer.masksToBounds = YES;

D.   [rectView setNeedsDisplay];

43: Which of the follow statements is TRUE of the use of categories?

A.   A category can only be declared for abstract classes.

B.   You can also use categories to split the implementation of a complex class across multiple source code files.

C.   The syntax to declare a category uses the @protocol keyword.

D.   The compiler synthesises any instance variable or property accessor methods for the category.

44: Which of the following best describes the differences between iOS 7 and iOS 6?

A.   iOS 7 supports Autolayout.

B.   iOS 7 user interface has been completely redesigned.

C.   iOS 7 user interface has been completely redesigned and has 64-Bit Support.

D.   iOS 6 is not supported on iPhone 5s and iPhone 5c

45: NSXMLParser is which kind of parser ?

A.   SAX Parser

B.   DOM Parser

46: True or False? An object with at least one owner can be destroyed.

A.   True

B.   False

47: This code doesn't do much, but which line will call the + (void)initialize method on the class SomeClass 1. - (void)doSomething 2. { 3. [SomeClass someClassMethod]; 4. SomeClass *obj = [[SomeClass alloc] init]; 5. NSString *descriptionString = [obj getNewString]; 6. }

A.   line 3

B.   line 1

C.   line 5

D.   line 4

48: The app is in the background but not executing code. What State App is it in?

A.   Suspended

B.   InActive

C.   Terminated

D.   None of above

E.   Background

49: Which of the following is true?

A.   A class cannot implement more than one protocol

B.   A class cannot be declared as abstract

C.   Instance variables must begin with underscore

D.   Instance variables have to be declared in the header file containing the class definition

50: What is the effect of using 'weak' in the following @property definition: @property (nonatomic, weak) SomeClass *responder; ?

A.   The responder object is retained and the pointer is set to nil when the object is destroyed

B.   The responder object is not retained and the pointer is set to nil when the object is destroyed

C.   The responder object is retained and the pointer will point to free memory when the object is destroyed

D.   The responder object is not retained and the pointer will point to free memory when the object is destroyed