iOS Interview Questions with Answers part1

来源:互联网 发布:网络的利与弊作文高中 编辑:程序博客网 时间:2024/05/02 04:40

原帖地址:http://huntmyideas.weebly.com/blog/ios-interview-questions-with-answers-part1

iOS Interview Questions with Answers part1

06/09/2014

1 Comment

 
Picture
1.what happens if you remove the object from the array, and you try to use it?
Answer:-
Application crashes
2.Difference between HTML & XML?
Answer:-
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?

Answer:-

iPhone SDK tools:
Xcode
Interface Builder
iPhone/iPad simulator
Instrument

4.what are the Delegate Methods for XML Parsing?

Answer:-


There are mainly 3 Types of Delegate methods for XML Parsing

i. did start element
ii. did end element
iii. found characters

5.What is XML parsing?

Answer:-

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

6.Difference Between nil & NiL?

Answer:-

both nil, Nil return a NULL pointer (Zero pointer)
but 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?

Answer:-

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



8.what is Enum?

Answer:-

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


9. What is Forward declarations?

Answer:-

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

@class:

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

@protocols:

these are two types.

1)Formal protocol

2)Informal protocol


Formal protocol:-

It is a set of methods that must be implemented in any conformal class.

Informal protocol:

In informal protocol developer group methods by app fields.

10.What is Category?

Answer:-


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.

11.What is Property ?


Answer:-


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.


12.which data structure has been used in iPhone to store contacts ?


Answer:-

NSHashTable

13.what are the property declarations/attributes?

Answer:-


atomic,
nonatomic,
readonly,
retain,
copy.

14.What are the types of accessory methods?

Answer:-

we have 2 types of accessory  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.

15.what is a Selector?


Answer:-


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

16.What is Delegate?

Answer:-

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

17.What is an App Delegate?


Answer:-

it is necessary in any app.
it is a controller which takes care critical events
while Starting Running and Editing applications


18.What is iPhone Paths ?


Answer:-

iPhone contains two paths.

(i).Resource path:

By using this path we can retrieve the data from resource path.But we can not add the data.

(ii).Modify path

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

19.What is Accelerometer?

Answer:-


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

20.Header file ?

Answer:-


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

21.Diff between self and super?

Answer:-

Self:


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

Super:

Super refers to the same variable.

22.What is Resources?

Answer:-


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

23.What is Products?

Answer:-

The final output present in product folder and extension is .app
Initially .app is in red colour. Once if you can build the app then the app is created.

24.What is Files owner window?

Answer:-


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

25.what compiler we have used in Objective c?

Answer:-

Compiler for objective c GCC version 4.0

26.What is SDK ?

Answer:-


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

27.What is Xcode?

Answer:-


Xcode is an Integrated Development Environment IDE
it acts like an Editor of Objective c language.
We can write,run,build our code in Xcode.

28.What is the simulator?

Answer:-


It is a demo to check our applications if we did not have the original device

29.what are Instruments?

Answer:-

The instrument enables you to dynamically trace and profile the performance of the Mac os,iPhone, iPad applications.
By using Instruments we can test the performance of the application.

30.what is Interface Builder?

Answer:-

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.

31.what is about Inspector?

Answer:-

It is mainly used for setting the properties of view elements. It contains four sections.

(i) Attribute inspector
(ii) Connection
(iii) Size of inspector
(iv)Identity

32.Explain Groups and File sections:

Answer:-


Classes:

In class folder actual coding will be their.
for window based application we have two files.

(i)AppDelegate.h
(ii)AppDelegate.m

For view based applications we have four files.

(i)appDelegate.h
(ii)appDelegate.m
(iii)viewController.h
4)viewController.m

33.What are different Layers of iOS?

Answer:-


Cocoa Touch Layer

Media Layer
Core Services Layer
Core Services Layer

34.what is optimization?

Answer:-

Optimization is nothing but making our application more attractively even after compilation of the coding

35.What happened if array release?

Answer:-

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.

36.How can we use multiple class inheritance in objective c?

Answer:-

In Objective c Multiple inheritance is not supported
for this purpose we use "categories" in Objective c.

37.How can u use object for abstract class?
(or) What is Shared Obj?


Answer:-

We can't create object for abstract class to call abstract class we use Shared obj.


38.How many bytes we can send to apple push notification server.


Answer:-

256bytes.


39.What is Xcode?

Answer:-


Xcode is an Integrated Development Environment IDE
it acts like an Editor of Objective c lang, We can write,run,build our code in Xcode.

40.What is the simulator?

Answer:-

It is a demo to check our applications if we didn't have the original device


41.what are Instruments:

Answer:-


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

42.what is Interface Builder?

Answer:-

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.

43.What are the types of accessory methods?

Answer:-

we have 2 types of accessor 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.

44.what is a Selector?


Answer:-

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


45.What is Delegate?

Answer:-


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

46.What is an App Delegate?

Answer:-

it is necessary in any app.
it is a controller which takes care critical events
while Starting Running and Editing applications

47.Interface?

Answer:-


In interface section that declares the methods and instance variables of class.

Implementation:

In implementation section that actually defines the class.


48.what kind of design pattern we are using?

Answer:-

we are using model view controller

Model:

This layer manipulates the coding part of the application.

View:

This layer manipulates the design part of the application.

Controller:

This layer acts as bridge between model and view controller.

49.what is Id?

Answer:-


It is a datatype.Id is a generic c-type used by obj-c to refer to any object.

50.NSFile manager?

Answer:-


By using NSFile manager we can compare,add,delete and update the data in database.
- See more at: http://huntmyideas.weebly.com/blog/ios-interview-questions-with-answers-part1#sthash.CfQCKYGu.dpuf
0 0