iPhone Programming : iOS Test

Objective type Question

1. Which symbol is used as a syntactic marker for blocks of code in iPhone OS 4.0?

a: ~

b:$

c: ^

d: *

2. What is the datatype of the parameter inValidBitsPerChannel for the function CalculateLPCMFlags in CoreAudioTypes class in iPhone OS 4.0?

a: UInt32

b: bool

c: Float32

d: UInt64

3: When your session becomes active, which of the following iPhone OS 4.0 audio session categories allows other audio to continue playing?

a: AVAudioSessionCategoryAmbient

b: AVAudioSessionCategorySoloAmbient

c: AVAudioSessionCategoryPlayback

d: AVAudioSessionCategoryRecord

4: What will the following method call do if the value of the accessed counter is 0? 

-(void)discardContentIfPossible

a: It will discard the contents of the object because the counter is 0

b: It will not discard the contents of the object because the counter is required to be above 0

c: It will not discard the content of the object as a negative counter value is required.

d None of the above

5: When using a Cocoa framework, what will allControlEvents method of UIControl class return in case it fails to create the object?

a: failure to create

b: no object to return

c: status code 420

d: nil

6: Which of the following statement is correct regarding functions open and open in generic C?

a:  fopen returns an error if the file does exist.

b:  fopen does not automatically create the file if it does not exist

c:  open returns an error if the file does exist

d:  open returns a file descriptor

7: What will happen if your file name ExampleImage.png is being called as follows:

[UIImage imageNamed:@”ExamplImage.PNG”];

a: The image file will load in the simulator but not in iPhone OS 4.0 because it is case sensitive

b: The image file will load in iPhone OS 4.0 but not in the simulator because it is case sensitive

c: The file will load in both the simulator and iPhone OS 4.0 because they are both case insensitive

d: The file will load neither in the simulator nor in iPhone OS 4,0 because they are both case sensitive

8: What type of value is assigned to the loc-args child property of alert property in an Apple Push Notification?

a: string

b: array of strings

c: number

d: dictionary

9: Which Core Audio Service framework is used to record, play back, pause, loop, and synchronize audio in iPhone OS 4.0?

a: Audio Queue

b: Music Sequencing Services

c: Core Audio Clock

d: System Sound Services

10: Which audio Toolbox framework file defines an interface for reading and writing audio data in files in iPhone OS 4.0 ?

a:AudioConverter.h

b: AudioFile.h

c: AudioFileStream.h

d: AudioServices.h

11: The genstrings tool can parse ——–

a: C file with .c filename extension.

b: Obejctive-C files with .m filename extension

c: Java code file with .java filename extension

d: Nib files with any file name extension

12: Which of the following properties of the CAKeyframeAnimation class represents an optional array of NSNumber objects that define the duration of each keyframe segment?

a: path

b: keyTimes

c: rotationmode

d: continuityValues

13:  What are universal binaries in Xcode?

a: These are executable lies that can contain code and data for more than one architecture

b: These are file references which are generated by the target, such as an application

c: These are indexes that contain symbolic information for your project

d: These are used to specify build location settings

14: Which of the following OpenGL ES objects is a simple 2D graphics image in a specified formate?

a: texture

b: buffer

c: shaders

d: renderbuffer

e: framebuffers

15: Which of the following are NOT a property of UIImagePickerController class in iPhone OS 4.0?

a: cameraCaptureMode

b: mediaTypes

c: startVideoCapture

d: takePicture

e: videoQuality

16: What is the return value of function CGColorGetAlpha of class CGColor?

a: An alpha intensity value in the range [-1, 1]

b: An alpha intensity value in the range [-0.5,0.5]

c: An alpha intensity value in the range [0,1]

d: An alpha intensity value in the range[1,5]

17: Which of the following animation class provides simple interpolation between values for a layer property?

a: CABasicAnimation

b: CAKeyframeAnimation

c: CATransition

d: CAAnimationGroup

18: What will happen if an application is running and the user presses the Home button in iPhone OS 4.0 with 3GS?

a: The application will be terminated

b: The application will be shifted to background execution context

c: The application will continue to run until its execution ends

d: The application will be paused

19: Which of the following reasons will return a value of NO for the instance method startVideoCapture of class UIImagePickerController?

a: Movie capture is already in progress

b: The device does not support movie capture

c: The device is out of disk space

d: All of the above

20: Which of the following copy function will you use in Objective-C to create an entirely new compound object?

a: Shallow Copy

b: Deep Copy

c: Both a and b

21: which Core Audio Services framework handles positional and low-latency audio services in iPhone OS 4.0?

a: Audio Toolbox

b: Audio Unit

c: AV Foundation

d: Core Audio

e: OpenAL

22: What happens if Xcode is not able to find a file or folder at the path defined for it in the project?

a:  Xcode skips the file or the folder and continues execution

b:  Xcode gives an alert with a description of the missing file

c:  Xcode displays the item in red in the project window

23:  Apple’s implementation of HTTP Live Streaming supports DRM (Digital rights management)

a: True

b: False

24:  Which of the following terms are related to Memory Management in Objective-C?

a:  alloc

b:  mutableCopy

c: delete

d: release

25:  Which part of the HTTP Live streaming is responsible for taking input streams of media and encoding them digitally?

a: Server component

b: Distribution component

c: Client software

d: None of the above

26:  What is the data type of extendStart parameter of function CGShadingCreateAxial of class CGShading?

a: CGFloat

b: CGPoint

c: bool

d: CGFunctionRef

e: int

27: What will the hitTest object of the CALayer class return if the point lies outside the receiver’s bounds rectangle?

a: nil

b: true

c: false

d: 0

28:  Which of the following is the correct syntax for declaring a class in Objective-C?

a:   @interface ClassName : ItsSuperclass

{

instance variable declarations

}

b: @implementation ClassName : ItsSuperClass

{

instance variable declaration

}

c: @class ClassName: ItsSuperClass

{

instance variable declaration

}

d:  All are correct

29: If you want to rotate an object using Core Animation, in radians,  in the z axis, which of the following key paths of a layer’s CATransform3D matrix will you use?

a: rotation

b: rotation.xy

c: rotation.x

d:rotation.y

e:rotation.z

30: What is the datatype of the clockwise parameter of the CGContextAddArc function of the CGContext class?

a: bool

b: int

c: CGFloat

d: CGContextRef

31: Which of the following properties of the GKSession class is read-only?

a: available

b: delegate

c: displayName

d: peerID

e: sessionID

32: Which of the following types of audio file has NO size restriction?

a: AIFF

b: WAVE

c: CAF

d: All of the above have file size restrictions

33: ABPersonComparePeopleByName in iPhone OS 4.0?

a: kCFCompareLessThan

b: kCFCompareEqualTo

c: kCFCompareGreaterThan

d: None of the above

34:  Which of the following debugging tasks are provided by Xcode to find and squash bugs in your code?

a: Add and set breakpoints

b: View your call stack per thread

c: View the value of variable by hovering the mouse pointer over them

d: Execute a single line of code

e: All of the above

35: If the code is written using the Core Foundation and Foundation macros, the simplest way to create strings files is:

a: Using an option in the preferences panel of Interface Builder

b: By merging the comments from the individual entries into one comment string

c: By unlocking all connections

d: By using the genstrings command-line tool

36: When you send an object a retain message in Memory Management using Objective-C, what will happen?

 a: Its retain count is increased by 1.

b: Its retain count is decremented by 1.

c: Its retain count remains same

d: Its retain count is set to 0

37: What is the return value of SecRandomCopyBytes function of SecRandom class in iPhone OS 4.0 if the function completes successfully?

a: 0

b: 1

c: -1

d: true

38: How much time in seconds will it take to display an animation if you have 60 images using UIImageView class for the property animationDuration?

a: 1

b: 2

c: 10

d: 15

39: What is the functionality of the beta parameter of function catlas_caxpby in class colas?

a: Input vector X

b: Input vector Y

c: Scaling factor for X

d: Scaling factor for Y

40: What will be the return value of CFHTTPMessageApplyCredentials function of CFHTTPMessage class if the authentication is successful?

a: TRUE

b: FALSE

c: nil

d: 0

e: 1

2 responses to “iPhone Programming : iOS Test

Leave a comment