The Complete Project Source Code Platform

Kashipara.com is a community of ONE million programmers and students, Just like you, Helping each other.Join them. It only takes a minute: Sign Up

Buy a laptop for coding and programming Buy a programming books

latest objective c (iphone) Job Interview Questions And Answers


Why don't preparation your interviews. Best and top asking questions objective c (iphone) questions and answers. Prepare your job objective c (iphone) interview with us. Most frequently asked questions in objective c (iphone) interview. Top 10 most common objective c (iphone) interview questions and answer to ask. objective c (iphone) most popular interview question for fresher and experiences. We have good collection of objective c (iphone) job interview questions and answers. Ask interview questions and answers mnc company.employee ,fresher and student. objective c (iphone) technical questions asking in interview. Complete placement preparation for major companies tests and objective c (iphone) interviews,Aptitude questions and answers, technical, interview tips, practice tests, assessment tests and general knowledge questions and answers.


Free Download objective c (iphone) Questions And Answers Pdf.


latest objective c (iphone) FAQ objective c (iphone) Interview Questions and Answers for Experiences and Freshers.



What happens when you send autorelease or retain message to autorelease pool?

NSAutoreleasePool  *autoRelease =[ [[ NSAutoreleasePool alloc] init] autorelease]; or

NSAutoreleasePool  *autoRelease =[ [[ NSAutoreleasePool alloc] init] retain];

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:45:42

When you will create an auto release pool in your application?

There are different occasions when you need to create autorelease pool in your application.
1. When you create a new thread you need to create an autorelease pool because each thread manages his own memory. Also, if one thread creates a problem, it will be only inside that thread, not in main thread.

2. When you write a loop that creates lot of temporary objects, then you should create an autorelease pool. Take a look at following code

NSMutableArray *array = [NSMutableArray arrayWithArray:anyOtherArray];

If this is only one line, no problem because array is added to application main autorelease pool and it will be eventaully released from memory but imagine if you are in loop which runs one thousad times then there will lots of temp objects added to application main autorelease pool which is kind of bad memory management practice. To fix this

for (int i=0; i<1000, i++) {
NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSMutableArray *array = [NSMutableArray arrayWithArray:anyOtherArray];
[pool release];

}

Now array object is being added to this “pool” rahter than application main autorelease pool and this pool is being release at each iteration of loop. If we have not created this pool these 1000 array objects will reside in memory untill application main autorelease pool is drained.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:44:59

When to use NSMutableArray and when to use NSArray?

Normally we use mutable version of array where data in the array will change. For example, you are passing a array to function and that function will add some elements to that array or will remove some elements from array, then you will select NSMutableArray.

When you don’t want to change you data, then you store it into NSArray. For example, the country names you will put into NSArray so that no one can accidentally modify it.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:44:28

Can we use one tableview with two different datasources? How you will achieve this?

Yes. We can conditionally bind tableviews with two different data sources.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:43:58

Can we use two tableview controllers on one view controller?

Yes. We can use as many table views in one view controllers. To differentiate between tableviews, we can assign table views different tags.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:10:49

What is responder chain?

Suppose you have a hierarchy of views such like  there is superview A which have subview B and B has a subview C. Now you touch on inner most view C. The system will send touch event to subview C for handling this event. If C View does not want to handle this event, this event will be passed to its superview B (next responder). If B also does not want to handle this touch event it will pass on to superview A. All the view which can respond to touch events are called responder chain. A view can also pass its events to uiviewcontroller. If view controller also does not want to respond to touch event, it is passed to application object which discards this event.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:10:03

What is polymorphism?

This is very famous question and every interviewer asks this. Few people say polymorphism means multiple forms and they start giving example of draw function which is right to some extent but interviewer is looking for more detailed answer.

Ability of base class pointer to call function from derived class at runtime is called polymorphism.

For example, there is super class human and there are two subclasses software engineer and hardware engineer. Now super class human can hold reference to any of subclass because software engineer is kind of human. Suppose there is speak function in super class and every subclass has also speak function. So at runtime, super class reference is pointing to whatever subclass, speak function will be called of that class.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:09:32

Flow of push notification

Your web server sends message (device token + payload) to Apple push notification service (APNS) , then APNS routes this message to device whose device token specified in notification.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:07:52

How push notification works?

This service is provided by Apple in which rather than pinging server after specific interval for data which is also called pull mechanism, server will send notification to your device that there is new piece of information for you. Request is initiated by server not the device or client.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:07:18

What is push notification?

Imagine, you are looking for a job. You go to software company daily and ask sir “is there any job for me” and they keep on saying no.  Your time and money is wasted on each trip.(Pull Request mechanism)

So, one day owner says, if there is any suitable job for you, I will let you know. In this mechanism, your time and money is not wasted. (Push Mechanism)

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:05:51

Swap the two variable values without taking third variable?


int x=10;
int y=5;
x=x+y;
NSLog(@”x==> %d”,x);

y=x-y;
NSLog(@”Y Value==> %d”,y);

x=x-y;
NSLog(@”x Value==> %d”,x);

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:04:22


What is difference between NSNotification and delegate?

Delegate is passing message from one object to other object. It is like one to one communication while nsnotification is like passing message to multiple objects at the same time. All other objects that have subscribed to that notification or acting observers to that notification can or can’t respond to that event. Notifications are easier but you can get into trouble by using those like bad architecture. Delegates are more frequently used and are used with help of protocols.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:02:50


When we call objective c is runtime language what does it mean?

Objective-C runtime is runtime library that is open source that you can download and understand how it works. This library is written in C and adds object-oriented capabilities to C and makes it objective-c. It is only because of objective c runtime that it is legal to send messages to objects to which they don’t know how to respond to. Methods are not bound to implementation until runtime. Objective-C defers its decisions from compile time to run time as much as it can. For example, at runtime, it can decide to which object it will send message or function.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:02:09


What are mutable and immutable types in Objective C?


Mutable means you can change its contents later but when you mark any object immutable, it means once they are initialized, their values cannot be changed. For example, NSArray, NSString values cannot be changed after initialized.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:01:37

What is keyword atomic in Objective C?

When you place keyword atomic with a property, it means at one time only one thread can access it.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 11:01:10

Can we use two tableview controllers on one view controller?

Yes, we can use two tableviews on the same view controllers and you can differentiate between two by assigning them tags…or you can also check them by comparing their memory addresses.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 10:59:46

What are KVO and KVC?

KVO: Normally instance variables are accessed through properties or accessors but KVC gives another way to access variables in form of strings. In this way your class acts like a dictionary and your property name for example “age” becomes key and value that property holds becomes value for that key. For example, you have employee class with name property.

You access property like

NSString age = e.age;

setting property value.

e.age = @”16″;

Now how KVC works is like this

[e valueForKey:@"age"];

[e setValue:@"34" forKey:@"age"];


KVO : The mechanism through which objects are notified when there is change in any of property is called KVO.

For example, person object is interested in getting notification when accountBalance property is changed in BankAccount object.To achieve this, Person Object must register as an observer of the BankAccount’s accountBalance property by sending an addObserver:forKeyPath:options:context: message.


objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 10:58:31

Difference between protocol in objective c and interfaces in java?

Protocol is also way to relate classes that are not related in inheritance hierarchy. Protocols and interfaces both are used to achieve multiple inheritance.

There is minor difference between these two. In Objective-C, protocols also implement NSObject protocol to access all the mehthods in NSObject

@protocol WebProtocol <NSObject>

@end

If I don’t implement NSObject explicitly, I will not be able to access NSObject methods like retain, release etc. when I access through WebProtocol instance.

While in Java you don’t need to implement Object interface explicitly. It is implicitly implemented.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 10:55:26

Difference between categories and extensions?

Class extensions are similar to categories. The main difference is that with an extension, the compiler will expect you to implement the methods within your main @implementation, whereas with a category you have a separate @implementation block. So you should pretty much only use an extension at the top of your main .m file (the only place you should care about ivars, incidentally) — it’s meant to be just that, an extension.

objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 10:54:42

What is difference between implementing a category and inheritance? 


What is advantage of categories?

You can add method to existing class even to that class whose source is not available to you. You can extend functionality of a class without subclassing. You can split implementation in multiple classes. While in Inheritance you subclass from parent class and extend its functionality.


objective c iphone 1 year experiences interview question.

objective c (iphone)   2013-05-07 10:54:13




latest objective c (iphone) questions and answers for experienced


objective c (iphone) best Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of objective c (iphone) Programming Language. here some questions that helpful for your interview. objective c (iphone) 2024 job interview questions with answers. objective c (iphone) for employee and fresher. Here we present some more challenging practice objective c (iphone) interview questions and answers that were asked in a real interview for a objective c (iphone) developer position. These questions are really good to not just test your objective c (iphone) skills, but also your general development knowledge. objective c (iphone) programming learning. we hope this objective c (iphone) interview questions and answers would be useful for quick glance before going for any objective c (iphone) job interview.