iPhone Interview Questions 2

1)what happens if you remove the object from the array, and you try to use it?our application crashes

2)Difference between HTML & XML?

XML was designed to transfer and store the data
XML was to carry data not to display the data
XML is designed to be self description
HTML was designed to Display the data

3)What are iPhone SDK Tools?

iPhone SDK tools:
Interface Builder
iphone/iPad Simmulater

4)what are the Delegate Metohods for XML Parsing?

There are mainly 3Tyoes of Deligate metots for XML Parsing
i. did start element
ii. did end element
iii. found characters

5)What is XML parsing?

xml parsing is the trancefer of data from xml page to our application
the data which is in term of elements.

6)Difference Between nil & NiL?
both nil, Nil return a NULL pointer (Zero pointer)
nil is specific to objects (e.g., id)
and Nil is specific to class pointers.
X [for the NULL pointers in Objective c We have to use :nil,
in the same way for the NULL pointers in C,C++ We have to use :NiL
NiL is just like NULL]

7)what happens when we invoke a method on a nil pointer?

It returns 0, nil, a structure filled with 0s

8)what Enum?

It is a user defined data type.it improves speed of execution.
By default it assigns range from 0,1……

9)Forword declarations:

@class,@protocals these are forward declarations to avoid cyclic dependencies.

this directive to make a forward reference to another class and improve the .h file.

these are two types. !)Formal protocol 2)Informal protocol

Formal protocal:
It is a set of methods that must be implemented in any conformic class.

Informal protocal:
In informal protocol developer group methods by app fields.

A category is a way of adding new methods to the all instances of existing class with out modifying the class.The use of category is extending the NSString class to add functionality.


By using property what ever the data are stored in array,string,… that values are used in any where in that program.Property contains the data and synthesize retrieve the data.

what are the property declarations/attributes?
What are the types of accessory methods?
we have 2 types of ac…. methods:

i.Getter method:
Getter method is an accessor method that retrieves the value of an instance variable.

ii.Setter method:
Setter method is an accessor method that Sets the value of an instance variable.

what is a Selector?
Selector can either be a name of method Or message to an object.

What is Delegate?
it is an object that usually read to some events in another object
A Deligate allows one object to send messages to another object when an Event happens.
An object directly to carryout an action by another object.

What is an App Delegate..?
it is necessary in any app.
it is a controller which takes care critical events
whle Starting Running and Editing applications

iPhone Paths:

iPhone contains two paths.
1.Resource path:
By using this path we can retrieve the data from resource path.But we can not add the data.
2.Modify path

By using this path we can add,modify,delete,retrieve the data.

The accelerometer allows the device to detect the orientation of the device and adapts the content to suit the new orientation.

Header file:
header files are preprocessor directories.
in Obj c By using #include,#import we can import the header files.

Diff between self and super:

self is a variable that refers to the object of present class.
Super referes to the same variable.

In resources we can add the outside contents like images,videos,audio files.
It contains info.plist file.plist file having entire project information.

The final output present in product folder and extension is .app
Intiallu .app is in red color.once if you can build the app then the .app is created.

Files owner window:

It contains copy of nib files.
It is always 1st icon in any .nib file.

what compiler we have used in Objective c?

Compiler for objective c GCC version 4.0

SDK means software development kit. It contains Xcode IDE,instruments, iPhone simulator,Interface Builder,Frameworks…

What are SDK tools in iPhone?

What is Xcode?
Xcode is an Intigrated Development Environment IDE
it acts like an Editor of Objective c loang
We can write,run,build our code in xcode

What is the simulator?
it is a demo to check our applications if we didn,t have the original device

what are Instruments:
The instrument enables you to dynamically trace and profile the performance of the Macos,iPhone, iPad applications.
Bu using Instruments we can test the performance of the application.

what is Interface Builder:
Interface builder is developed in 1988.It is a visual tool that allows you to design your interfaces for iphone.By using interface builder we can drag and drop the views on interface.

Explain about Inspector
It is mainly used for setting the properties of view elements. It contains four sections.
1)Attribute inspector
3)Size of inspector

Groups and File sections:
In class folder actual coding will be their.
for window based application we have two files.
For view based applications we have four files.

what are different Layers of iOS
Cocoa Touch Layer
Media Layer
Core Services Layer
Core Services Layer
what is optimization?
Optimaisation is nothing but
Making our application more attractively even after complition of the coding

What happend if array release?
As such, when the NSArray is released your object will still have a retain count of one and will therefore still be around after the autorelease pool is emptied. (Until of course you release it.

how can we use multiple class inheritance in objective c?

In Objective c Multiple inheritance is not supported
for this propous we use “categories” in Objective c

How can u use object for abstract class?
(or) What is Shared Obj?
We can’t create object for abstract class to call abstract class we use Shared obj.