Question from the Objective-C test

What is the output of the following Objective-C code? @interface MyClass : NSObject - (void)doSomething; @end @implementation MyClass - (void)doSomething { NSLog(@"%@", self); } @end int main(int argc, const char * argv[]) { MyClass *myClass = [[MyClass alloc] init]; [myClass doSomething]; return 0; }

Medium

What happens in the runtime when you send a message to nil?

Author: Smart&SoftStatus: PublishedQuestion passed 16 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!