Thursday, November 10, 2016

iPhone Programming OS 4.0 Test 2016 – Upwork Test Answers

Upwork iPhone Programming OS 4.0 Test 2016...

69 Answered Test Questions:
1. The genstrings tool can parse _____.
Answers:
a. C files with .c filename extension. 
a. Objective-C files with .m filename extension. 
a. Java code files with .java filename extension. 
a. Nib files with any file name extension.
2. Which of the following need to be modified while localizing an application?
Answers:
a. Nib files (windows, views, menus). 
a. Static text. 
a. Icons and graphics.
a. Dynamic text generated by your program. 
3. Which of the following terms are related to Memory Management in Objective-C?
Answers:
a. alloc
a. mutableCopy
a. delete
a. release
4. Which of the following properties of the UIImage class are not in use after iOS 4.2?
Answers:
a. imageOrientation
a. size
a. leftCapWidth
a. topCapHeight
5. What is the return value of SecRandomCopyBytes function of SecRandom class in iPhone OS 4.0 if the function completes successfully?
Answers:
a. 0
a. 1
a. -1
a. true
6. You want to animate a layer’s opacity to 0 while moving it further away in the layer. Which of the following code snippets will you use?
Answers:
a. theLayer.opacity=0.0; theLayer.zPosition=0;
a. theLayer.opacity=0.0; theLayer.zPosition= -100; 
a. theLayer.opacity=0.0; theLayer.zPosition=100;
a. theLayer.opacity=1.0; theLayer.zPosition=0;
7. What is the value type of UTTypeConformsTo key of uniform type identifier for iPhone OS 4.0?
Answers:
a. array of dictionaries
a. array of strings
a. string
a. dictionary
a. integer
8. Which of the following statements is correct regarding functions fopen and open in generic C?
Answers:
a. fopen returns an error if the file does exist.
a. fopen does not automatically create the file if it does not exist. 
a. open returns an error if the file does exist.
a. open returns a file descriptor.
9. Which of the following is the correct syntax for declaring a class in Objective-C?
Answers:
a. @interface ClassName : ItsSuperclass { instance variable declarations } method declarations @end
a. @implementation ClassName : ItsSuperclass { instance variable declarations } method declarations @end
a. @class ClassName : ItsSuperclass { instance variable declarations } method declarations @end
a. All are correct
10. Which of the following properties of the GKSession class is read-only?
Answers:
a. available
a. delegate
a. displayName
a. peerID
a. sessionID
11. Which of the following debugging environments are provided by Xcode to find and squash bugs in your code?
Answers:
a. Debugging from the text editor
a. Mini Debugger
a. Debugger window
a. GDB debugger console
a. All of the above
12. When your session becomes active, which of the following iPhone OS 4.0 audio session categories allows other audio to continue playing?
Answers:
a. AVAudioSessionCategoryAmbient
a. AVAudioSessionCategorySoloAmbient
a. AVAudioSessionCategoryPlayback
a. AVAudioSessionCategoryRecord
13. Which Audio Toolbox framework file defines an interface for reading and writing audio data in files in iPhone OS 4.0?
Answers:
a. AudioConverter.h
a. AudioFile.h
a. AudioFileStream.h
a. AudioServices.h
14. Which of the following is NOT the default behavior of an audio session in iPhone OS?
Answers:
a. Playback is disabled and recording is enabled. 
a. When you move the Ring/Silent switch to the “silent” position, your audio is silenced.
a. When you press the Sleep/Wake button to lock the screen, or when the Auto-Lock period expires, your audio is silenced.
a. When your audio starts, other audio on the device—such as iPod audio that was already playing—is silenced.
15. Which of the following debugging tasks are provided by Xcode to find and squash bugs in your code?
Answers:
a. Add and set breakpoints.
a. View your call stack per thread.
a. View the value of variables by hovering the mouse pointer over them.
a. Execute a single line of code.
a. All of the above
16. Apple’s implementation of HTTP Live Streaming supports DRM (Digital rights management).
Answers:
a. True
a. False
17. Which Core Audio Services framework handles positional and low-latency audio services in iPhone OS 4.0?
Answers:
a. Audio Toolbox
a. Audio Unit
a. AV Foundation
a. Core Audio
a. OpenAL
18. What are universal binaries in Xcode?
Answers:
a. These are executable files that can contain code and data for more than one architecture. 
a. These are file references which are generated by the target, such as an application.
a. These are indexes that contain symbolic information for your project.
a. These are used to specify build location settings.
19. What is the function of the Code Sense feature in Xcode?
Answers:
a. Code Sense helps in switching between different circumstances such as development or release.
a. Code Sense maintains an index that contains important information for your project.
a. Code Sense creates a cache for the files which are being used frequently.
a. Code Sense maintains an index of files used in a project.
a. Code sense is the code completion feature helpful in avoiding typing and syntax errors. 
20. Which of the following animation class provides simple interpolation between values for a layer property?
Answers:
a. CABasicAnimation
a. CAKeyframeAnimation
a. CATransition
a. CAAnimationGroup
21. What will the hitTest: object of the CALayer class return if the point lies outside the receiver’s bounds rectangle?
Answers:
a. nil
a. true
a. false
a. 0
22. When the genstrings tool discovers a key string used more than once in a single strings file, it:
Answers:
a. deletes the comments from the individual entries and leaves one comment string without generating a warning.
a. merges the comments from the individual entries into one comment string and generates a warning. 
a. differentiates the comments from the individual entries into various strings and generates a warning.
a. None of the above
23. What is the datatype of the clockwise parameter of the CGContextAddArc function of the CGContext class?
Answers:
a. bool
a. int
a. CGFloat
a. CGContextRef
24. Which of the following languages can be used to write the code for Xcode projects?
Answers:
a. C
a. C++
a. Objective-C
a. Objective-C++
a. Java
25. What is the return value of function CGColorGetAlpha of class CGColor?
Answers:
a. An alpha intensity value in the range [-1,1]
a. An alpha intensity value in the range [-0.5,0.5]
a. An alpha intensity value in the range [0,1] 
a. An alpha intensity value in the range [1,5]
26. How much time in seconds will it take to display an animation if you have 60 images using UIImageView class for the property animationDuration?
Answers:
a. 1
a. 2
a. 10
a. 15
27. What will the following method call do if the value of the accessed counter is 0?
– (void)discardContentIfPossible
Answers:
a. It will discard the contents of the object because the counter is 0. 
a. It will not discard the contents of the object because the counter is required to be above 0.
a. It will not discard the content of the object as a negative counter value is required.
a. None of the above
28. Consider the following code with 2 alternatives of vector operations for OpenGL ES:
highp float f0, f1;
highp vec4 v0, v1;
Alternative 1: v0 = (v1 * f0) * f1;
Alternative 2: v0 = v1 * (f0 * f1);
Which alternative demonstrates proper use of vector operations?
Answers:
a. Alternative 1
a. Alternative 2
a. Both alternatives demonstrate proper use of vector operations.
29. Which of the following are the Derivative types defined in Objective-C?
Answers:
a. short
a. long
a. long long
a. int
30. Which of the following properties of the CAKeyframeAnimation class represents an optional array of NSNumber objects that define the duration of each keyframe segment?
Answers:
a. path
a. keyTimes
a. rotationmode
a. continuityValues
31. Which Core Audio Service framework is used to record, play back, pause, loop, and synchronize audio in iPhone OS 4.0?
Answers:
a. Audio Queue
a. Music Sequencing Services
a. Core Audio Clock
a. System Sound Services
32. 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?
Answers:
a. rotation
a. rotation.xy
a. rotation.x
a. rotation.y
a. rotation.z
33. What is the default setting to refer to file locations in your Xcode project?
Answers:
a. Relative to Build Product
a. Relative to Project
a. Relative to Enclosing Group
a. Relative to
a. Absolute Path
34. Before editing the Nibs, one should:
Answers:
a. Unlock all connections.
a. Lock all connections. 
a. Break all connections.
a. None of the above
35. What is the default value of the borderColor property of the CALayer class?
Answers:
a. 0
a. nil
a. opaque black
a. dark black
36. What will be the return value of function ABPersonComparePeopleByName when person1 goes before person2 in class ABPersonComparePeopleByName in iPhone OS 4.0?
Answers:
a. kCFCompareLessThan
a. kCFCompareEqualTo
a. kCFCompareGreaterThan
a. None of the above
37. What happens if Xcode is not able to find a file or folder at the path defined for it in the project?
Answers:
a. Xcode skips the file or the folder and continues execution.
a. Xcode gives an alert with a description of the missing file.
a. Xcode displays the item in red in the project window. 
38. If the code is written using the Core Foundation and Foundation macros, the simplest way to create strings files is:
Answers:
a. Using an option in the Preferences panel of Interface Builder.
a. By merging the comments from the individual entries into one comment string.
a. By unlocking all connections.
a. By using the genstrings command-line tool. 
39. Which of the following copy functions will you use in Objective-C to create an entirely new compound object?
Answers:
a. Shallow Copy
a. Deep Copy
a. Both a and b
40. What is the data type of extendStart parameter of function CGShadingCreateAxial of class CGShading?
Answers:
a. CGFloat
a. CGPoint
a. bool
a. CGFunctionRef
a. int
41. What is the datatype of the parameter inValidBitsPerChannel for the function CalculateLPCMFlags in CoreAudioTypes class in iPhone OS 4.0?
Answers:
a. UInt32
a. bool
a. Float32
a. UInt64
42. What will be the return value of CFHTTPMessageApplyCredentials function of CFHTTPMessage class if the authentication is successful?
Answers:
a. TRUE
a. FALSE
a. nil
a. 0
a. 1
43. Which of the following statements regarding Objective-C are correct?
Answers:
a. In Objective-C, the keyword for NULL is nil.
a. In Objective-C, #import and #include compiler directives carry out the same operations.
a. In Objective-C, for the object-oriented constructs (such as method return values), id is the default data type. 
a. The keyword nil has an id with a value of 0.
44. What is the default value of the remoteParticipantVolume property of the class GKVoiceChatService in iPhone OS 4.0?
Answers:
a. 0.0
a. 0.5
a. 1.0
a. 5.0
45. What is the default value of the fontSize property of the CATextLayer class?
Answers:
a. 8.0
a. 12.0
a. 18.0
a. 36.0
46. Which part of the HTTP Live Streaming is responsible for taking input streams of media and encoding them digitally?
Answers:
a. Server component
a. Distribution component
a. Client software
a. None of the above
47. Locking all connections before editing the Nib files can be achieved by using:
Answers:
a. An option in the Start Menu.
a. An option in the Preferences panel of Interface Builder. 
a. An option in the Preferences panel of Language Directory.
a. Any of the above.
48. When you send an object a retain message in Memory Management using Objective-C, what will happen?
Answers:
a. Its retain count is incremented by 1. 
a. Its retain count is decremented by 1.
a. Its retain count remains same.
a. Its retain count is set to 0.
49. When using a Cocoa framework, what will all ControlEvents method of UIControl class return in case it fails to create the object?
Answers:
a. failure to create
a. no object to return
a. status code 420
a. nil
50. By default, is the search interface visible in the UISearchDisplayController class?
Answers:
a. Yes
a. No
51. Which of the following reasons will return a value of NO for the instance method startVideoCapture of class UIImagePickerController?
Answers:
a. Movie capture is already in progress.
a. The device does not support movie capture.
a. The device is out of disk space.
a. All of the above
52. What will be the value of the clockwise parameter of the CGContextAddArc function of the CGContext class if you want to create a counterclockwise arc?
Answers:
a. 0
a. 1
a. True
a. False
53. Which of the following types of audio files has NO size restriction?
Answers:
a. AIFF
a. WAVE
a. CAF
a. All of the above have file size restrictions.
54. Which of the following is NOT a parameter of function SecKeyDecrypt of the class SecCertificate in iPhone OS 4.0?
Answers:
a. key
a. padding
a. cipherText
a. certificate
55. Which of the following defined types is a dynamic object type in Objective-C?
Answers:
a. id
a. Class
a. SEL
a. BOOL
56. What is the default value of allowsEditing property of UIImagePickerController class in iPhone OS 4.0?
Answers:
a. NO
a. YES
a. enable
a. disable
57. Which of the following OpenGL ES objects is a simple 2D graphics image in a specified format?
Answers:
a. texture
a. buffer
a. shaders
a. renderbuffer
a. framebuffers
58. Which symbol is used as a syntactic marker for blocks of code in iPhone OS 4.0?
Answers:
a. ~
a. $
a. ^
a. *
59. Which of the following methods is used for the purpose of creating your view objects in memory management?
Answers:
a. Initialization methods
a. loadView
a. viewDidLoad
a. dealloc
60. What will happen if an application is running and the user presses the Home button in iPhone OS 4.0 with 3GS?
Answers:
a. The application will be terminated.
a. The application will be shifted to background execution context. 
a. The application will continue to run until its execution ends.
a. The application will be paused.
61. What is the functionality of the beta parameter of function catlas_caxpby in class cblas?
Answers:
a. Input vector X
a. Input vector Y
a. Scaling factor for X
a. Scaling factor for Y
62. Which of the following are NOT a property of UIImagePickerController class in iPhone OS 4.0?
Answers:
a. cameraCaptureMode
a. mediaTypes
a. startVideoCapture
a. takePicture
a. videoQuality
63. While opening Nib files, which of the following should not be ignored?
Answers:
a. Objects in a Nib file typically have connections between them that should not be broken. 
a. If Objects in a Nib file have broken connections, they should not be restored.
a. The size of the files.
a. None of the above
64. Which of the following directives are used to declare and define classes, categories, and protocols?
Answers:
a. @interface
a. @implementation
a. @protocol
a. @class
a. @end
65. What will happen if your filename ExampleImage.png is being called as follows:
[UIImage imageNamed:@”ExampleImage.PNG”]
Answers:
a. The image file will load in the simulator but not in iPhone OS 4.0 because it is case sensitive. 
a. The image file will load in iPhone OS 4.0 but not in the simulator because it is case sensitive.
a. The file will load in both the simulator and iPhone OS 4.0 because they are both case insensitive.
a. The file will load neither in the simulator nor in iPhone OS 4.0 because they are both case sensitive.
66. What type of value is assigned to the loc-args child property of alert property in an Apple Push Notification?
Answers:
a. string
a. array of strings
a. number
a. dictionary
67. What will the following method definition do if the value of the accessed counter is 0?
– (void)discardContentIfPossible
Answers:
a. It will discard the contents of the object because the counter is 0. 
a. It will not discard the contents of the object because the counter is required to be above 0.
a. It will not discard the content of the object as a negative counter value is required.
a. None of the above
68. Which of the following properties of ADBannerView class are read-only?
Answers:
a. bannerLoaded
a. currentContentSizeIdentifier
a. bannerViewActionInProgress
a. delegate
a. requiredContentSizeIdentifiers
69. Which of the following are new features to have been introduced in iPhone OS 4.0?
Answers:
a. Multitasking
a. Apple Push Notification Service
a. Local Notification
a. Gesture Recognizers

No comments:

Post a Comment

Earn for Free

http://hiredrmjru.trade/3670784521590/