Top Ad unit 728 × 90

Breaking News

recent

UpWork (oDesk) & Elance Cocoa programming for Mac OS X 10.5 Test Question & Answers

UpWork (oDesk) & Elance Cocoa programming for Mac OS X 10.5 Test Question & Answers are really very important to pass UpWork & Elance test. You will get top score at this skill test exam. If you found any problem or wrong answer please inform me via contact or comments. We will try to solve it in short. This test is very valueable to acquire knowledge of this skill. Lets Start test.


Ques : What is true regarding notifications?
Ans  : They can be dispatched to only one object + The object posting the notification does not even have to know whether the observer exists

Ques : What class should be used to load resources?
Ans  : NSBundle

Ques : What is a notification?
Ans  : A special message type used within the kernel

Ques :  What will be the output of the following code?

NSRect rect = NSMakeRect(0, 0, 10, 10);
NSRect *rect2 = malloc(sizeof(*rect2));
if(!rect2) {
    NSLog(@"Not enough memory.");
    exit(EXIT_FAILURE);
}

*rect2 = rect;

printf("%d\n", rect.size.width);
Ans  :  None of the above

Ques : Is the following code correct?

NSMutableArray *a = [NSMutableArray array];

// do something with a

[a release];
Ans  :  No

Ques : Is the following code valid?

NSSize s = NSMakeSize(10, 10);

int values[20];

values[s.height] = 5;
Ans  : Compile error

Ques : Which of the following platforms supports Cocoa?
Ans  : Mac OSX

Ques : Is there a double click event?
Ans  : Yes

Ques : Is the following code correct?

NSRect a = NSMakeRect(0, 1, 2, 3) + NSMakeRect(0, 1, 2, 3);
Ans  : No

Ques : Is the following code valid?

NSRect r;
 
r.size = NSMakeSize(10, 10);
r.origin = NSMakePoint(-5, -5);
Ans  : Yes

Ques : Is the following code correct?

NSMutableArray *a = [[NSMutableArray new] autorelease];

// do something with a

[a release];
Ans  : No

Ques : Which of the following retrieves the application main bundle?
Ans  : [NSBundle mainBundle]

Ques : Can you use NSLock on a POSIX mutex?
Ans  : Yes

Ques :  If you spawn a thread with POSIX thread api, will Cocoa be notified?
Ans  :  No

Ques : What method should be called before you are able to draw in the drawRect: method of a view?
Ans  :  None

Ques : Which of the following creates an autoreleased array?
Ans  : [NSMutableArray new];

Ques :  Can an object marked for autorelease be retained?
Ans  :  Yes

Ques : Fill the blank.
NSView : <> : NSObject
Ans  : NSResponder

Ques : If you call interpretKeyEvents:, which of the following method is likely to be called?
Ans  : insertText:

Ques : Where is the (0,0) coordinate located on the screen?
Ans  : bottom-left

Ques : What method should be called before you are able to draw outside the drawRect: method of a view?
Ans  : lockFocus

Ques : Can NSBundle be used to load Java code?
Ans  : No

Ques : Under Mac OS X 10.5, CGRect, CGSize and CGPoint have the same structure as NSRect, NSSize and NSPoint respectively. Is it true?
Ans  : Yes

Ques : What is an observer?
Ans  : An object registered with the notification center

Ques : Does Cocoa support 64bits?
Ans  : Yes

Ques : Fill the blank.

NSMutableArray : <> : NSObject
Ans  : NSArray

Ques : What is NSRect?
Ans  : A structure

Ques : Fill the blank.
NSCountedSet : <>  : NSObject
Ans  : NSMutableSet : NSSet

Ques : Can NSDistributedNotificationCenter be used to communicate between multiple machines?
Ans  : No

Ques : Is the following code correct?

NSMutableArray *a = [NSMutableArray new];

// do something with a

[a release];
Ans  : Yes

Ques : What threading API should be used in Cocoa?
Ans  : NSThread

Ques : How can you move a view?
Ans  : By changing the frame with setFrame:

Ques : Fill the blank.
NSButton : <> : NSObject
Ans  :  NSControl : NSView : NSResponder

Ques :  How is a GUI usually created in Cocoa?
Ans  : With interface builder

Ques : Is it possible to create events and dispatch them to the application?
Ans  : No

Ques : Can POSIX thread be used in Cocoa?
Ans  : Yes

Ques : Is it correct to have sibling views overlapping?
Ans  : No

Ques : In a typical Cocoa application, do you have to manage your runloop yourself?
Ans  : No

Ques :  Is NSString mutable?
Ans  : No

Ques : Can you use malloc/free in a Cocoa application?
Ans  : Yes, but only in a separate C library

Ques : What is NSViewHeightSizable constant used for?
Ans  : Autoresizing

Ques : Can poll() be used to fetch Cocoa events?
Ans  : Yes

Ques : What is a toll-free bridged class?
Ans  :  A class that can be interchanged with another class by casting

Ques : What is Cocoa?
Ans  : A framework

Ques : Is NSRunLoop thread safe?
Ans  :No

Ques : In which language is Cocoa written?
Ans  : Objective-C

Ques : Where should application resources be usually put?
Ans  : Within the application's bundle

Ques : Can an object be the delegate of multiple objects?
Ans  : No

Ques : Can an object be the delegate of multiple objects?
Ans  :  No

Ques : Is it mandatory to create an NSAutoreleasePool in a Cocoa application?
Ans  : No

Ques : What is the normal way of handling Cocoa events?
Ans  :  By implementing NSResponder methods in subclasses

Ques : Which of the following classes manages the computer's global notifications?
Ans  : NSDistributedNotificationCenter

Ques :  Can a notified object find out from where the notification is coming? (Sending object)
Ans  : Yes

Ques : How wide is unichar on a 32bit machine?
Ans  : 8bit

Ques : Fill the blank.

NSNotification : <> : NSObject
Ans  : Nothing is required to fill the blank

Ques : What kind of memory management mechanisms can Cocoa uses?
Ans  : Reference counting

Ques :  Can you detach threads in Cocoa?
Ans  : Yes

Ques : Which of the following is a valid Uniform Type Identifier?
Ans  : public.jpeg

Thanks for watching this test Question & Answers. Please don't forget to leave a comment about this post. You can also find some more effective test question & answers, information, techtunes, technology news, tutorials, online earning information, recent news, results, job news, job exam results, admission details & another related services on the following sites below. Happy Working!
News For Todays UpWork Elance Tests oEtab ARSBD-JOBS DesignerTab
UpWork (oDesk) & Elance Cocoa programming for Mac OS X 10.5 Test Question & Answers Reviewed by ARSBD on June 28, 2015 Rating: 5
All Rights Reserved by RESULTS & SERVICES | ARSBD © 2014 - 2015
Powered by DesignerTab

Contact Form

Name

Email *

Message *

Powered by Blogger.