Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which of the following is NOT a root class in the context of Objective-C?

Which of the following is NOT a root class in the context of Objective-C?

a. NSObject

b. NSNetworkService

c. NSBase

d. NSProxy

(its a single select question)

I get this question in a online exam for iOS 6. I knowNSObject and NSProxy are root classes. But I am not aware of any class with name NSNetworkService or NSBase.

I am wondering what is the correct answer for this question.

Note: I have cleared that test and not posting this question for cheating.

like image 850
iPhoneDev Avatar asked Jun 26 '13 11:06

iPhoneDev


1 Answers

I'm not aware of the classes NSNetworkService and NSBase (of course someone could name his class with prefix NS). NSObject and NSProxy are base classes, though. So the correct answer is b and c.

Edit (thanks Abizern): In the context of iOS, only NSObject is available which would add answer d to the set of classes NOT being a root class. I guess the opposite question "Which of the following classes are root classes?" would have been easier to answer given the fact that you said you can choose only one option ;)

like image 118
Norbert Avatar answered Oct 20 '22 00:10

Norbert