Mobile Software Developer Interview Questions

428 mobile software developer interview questions shared by candidates

Here's an Objective C category extension. What's wrong with this code? @interface UIImage (RemoteImage) { NSURL * url; UIImage * image; } - (id) initWIthURL: (NSURL *) _url; @end @implementation UIImage (RemoteImage) - (id) initWithURL: (NSURL *)_url { self = [super init]; if( self != nil ) { url = _url; NSURLResponse * response = [NSURLResponse new]; NSURLRequest * request = [[NSURLRequest alloc] initWithURL: url]; NSData * data = [NSURLConnection sendSynchronousRequest: request returningResponse: response error: nil]; image = [UIImage imageWithData: data]; return image; } return self; } - (void) dealloc { [super dealloc]; [url release]; [image release]; } @end
avatar

Mobile Software Engineer

Interviewed at GREE International Entertainment

2.8
Oct 31, 2012

Here's an Objective C category extension. What's wrong with this code? @interface UIImage (RemoteImage) { NSURL * url; UIImage * image; } - (id) initWIthURL: (NSURL *) _url; @end @implementation UIImage (RemoteImage) - (id) initWithURL: (NSURL *)_url { self = [super init]; if( self != nil ) { url = _url; NSURLResponse * response = [NSURLResponse new]; NSURLRequest * request = [[NSURLRequest alloc] initWithURL: url]; NSData * data = [NSURLConnection sendSynchronousRequest: request returningResponse: response error: nil]; image = [UIImage imageWithData: data]; return image; } return self; } - (void) dealloc { [super dealloc]; [url release]; [image release]; } @end

Given this code: int sum( int a, int b) { int i, s; for( i = a; i < b; i++) s+=a; } We're trying to get the sum of a range of numbers (1-3 = 6, 3-6 = 18, etc). What are the bugs in this code? What's the complexity of this code?
avatar

Mobile Software Engineer

Interviewed at IonGrid

5
Dec 5, 2012

Given this code: int sum( int a, int b) { int i, s; for( i = a; i < b; i++) s+=a; } We're trying to get the sum of a range of numbers (1-3 = 6, 3-6 = 18, etc). What are the bugs in this code? What's the complexity of this code?

Viewing 41 - 50 interview questions

Glassdoor has 428 interview questions and reports from Mobile software developer interviews. Prepare for your interview. Get hired. Love your job.