Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Mention Whether Ns Object Is A Parent Class Or Derived Class?

Answer»

NS object is the parent CLASS and CONSISTS of a number of INSTANCE VARIABLES and instance methods.

NS object is the parent class and consists of a number of instance variables and instance methods.

2.

Explain What Is Dot Notation?

Answer»

Dot notation involves assessing an INSTANCE variable by determining a class “instance” FOLLOWED by a “dot” followed in TURN by the name of instance variable or property to be ACCESSED.

Dot notation involves assessing an instance variable by determining a class “instance” followed by a “dot” followed in turn by the name of instance variable or property to be accessed.

3.

Explain How The Class “implementation” Is Represented In Objective-c?

Answer»

In Objective-C the CLASS “ IMPLEMENTATION” is represented with @implementation DIRECTIVE and ENDS with @end.

In Objective-C the class “ IMPLEMENTATION” is represented with @implementation directive and ends with @end.

4.

Explain How Messaging Works In Objective-c?

Answer»

MESSAGING are not bound to method IMPLEMENTATION until runtime in Objective-C. The compiler transforms a message expression, into a call on a messaging FUNCTION, objc_msgSend(). This function connects the RECEIVER and the name of the method mentioned in the message.

Messaging are not bound to method implementation until runtime in Objective-C. The compiler transforms a message expression, into a call on a messaging function, objc_msgSend(). This function connects the receiver and the name of the method mentioned in the message.

5.

Explain What Is The Main Difference Between The Function Calls And Messages?

Answer»

The MAIN difference between function CALL and message is that a function and its arguments are linked together in the compiled CODE, but a message and a receiving object are not linked until the program is EXECUTING and the message is sent.

The main difference between function call and message is that a function and its arguments are linked together in the compiled code, but a message and a receiving object are not linked until the program is executing and the message is sent.

6.

Explain What Are Objective- C Blocks?

Answer»

In Objective-C class, there is an object that COMBINES data with related behavior. It ENABLES you to form distinct SEGMENTS of code that can be passed around to functions or methods as if they were values. Objective-C blocks can be added to collections like NSDictionary or NSArray.

In Objective-C class, there is an object that combines data with related behavior. It enables you to form distinct segments of code that can be passed around to functions or methods as if they were values. Objective-C blocks can be added to collections like NSDictionary or NSArray.

7.

Explain How To Call The Function In Objective-c?

Answer»

To call the FUNCTION in Objective-C, you have to do ACCOUNT -> Object Name -> DISPLAY account information -> Method name

To call the function in Objective-C, you have to do Account -> Object Name -> Display account information -> Method name

8.

Explain What Is Data Encapsulation In Objective-c?

Answer»

In Objective-C, DATA encapsulation is referred to the MECHANISM of connecting the data and the FUNCTIONS that USE them.

In Objective-C, data encapsulation is referred to the mechanism of connecting the data and the functions that use them.

9.

Explain How String Is Represented In Objective-c?

Answer»

In Objective-C, the STRING is represented by USING NSS string and its sub-class NSMutableString provides several ways for CREATING string OBJECTS.

In Objective-C, the string is represented by using NSS string and its sub-class NSMutableString provides several ways for creating string objects.

10.

Explain What Is Synthesized In Objective-c?

Answer»

Once you have declared the property in objective-C, you have to tell the COMPILER INSTANTLY by using synthesize DIRECTIVE. This will tell the compiler to generate a getter&SETTER message.

Once you have declared the property in objective-C, you have to tell the compiler instantly by using synthesize directive. This will tell the compiler to generate a getter&setter message.

11.

Explain When To Use Nsarray And Nsmutablearray?

Answer»

NSArray: You will USE an NS array when data in the array don’t change. For EXAMPLE, the company name you will put in NS Array so that no ONE can manipulate it.

NSMUTABLEARRAY: This array will be USED in an array, when data in an array will change. For instance, if you are passing an array to function and that function will append some elements in that array then you will choose NSMutable Array.

NSArray: You will use an NS array when data in the array don’t change. For example, the company name you will put in NS Array so that no one can manipulate it.

NSMutableArray: This array will be used in an array, when data in an array will change. For instance, if you are passing an array to function and that function will append some elements in that array then you will choose NSMutable Array.

12.

Explain What Is Polymorphism In Objective-c?

Answer»

Polymorphism in Objective-C is referred to a CAPABILITY of BASE CLASS POINTER to call the function.

Polymorphism in Objective-C is referred to a capability of base class pointer to call the function.

13.

Explain What Is Single Inheritance In Objective-c?

Answer»

Objective-c SUBCLASS can only be OBTAINED from a single direct parent class this CONCEPT is known as “single inheritance” .

Objective-c subclass can only be obtained from a single direct parent class this concept is known as “single inheritance” .

14.

Explain What Are The Characteristics Of The Category?

Answer»

CHARACTERISTICS of category includes:

  • Even if you don’t have the ORIGINAL source code for implementation, a category can be declared for any CLASS
  • Any methods that you define in a category will be AVAILABLE to all instances of the original class as well as any sub-classes for the original class
  • At runtime, there is no VARIATION between a method appended by a category and one that is implemented by the original class.

Characteristics of category includes:

15.

Mention What Is The Use Of Category In Objective-c?

Answer»

The use of CATEGORY in OBJECTIVE-C is to extend an existing class by appending behavior that is useful only in certain situations. In order to add such EXTENSION to existing classes, objective –C PROVIDES extensions and CATEGORIES. The syntax used to define a category is @interface keyword.

The use of category in Objective-C is to extend an existing class by appending behavior that is useful only in certain situations. In order to add such extension to existing classes, objective –C provides extensions and categories. The syntax used to define a category is @interface keyword.

16.

Explain Class Definition In Objective-c?

Answer»

A class definition begins with the KEYWORD @interface followed by the interface (class) name, and the class body, closed by a pair of curly BRACES. In Objective-C, all classed are retrieved from the base class called NSObject. It gives BASIC methods like memory allocation and INITIALIZATION.

A class definition begins with the keyword @interface followed by the interface (class) name, and the class body, closed by a pair of curly braces. In Objective-C, all classed are retrieved from the base class called NSObject. It gives basic methods like memory allocation and initialization.

17.

List Out The Methods Used In Nsurl Connection?

Answer»

METHODS used in NSURL connection are:

  • Connection did RECEIVE response
  • Connection did receive data
  • Connection fail with error
  • Connection did FINISH LOADING

Methods used in NSURL connection are:

18.

Mention What Is The Class Of A Constant String?

Answer»

It’s and NXConstantString. NXConstantString *MYSTRING = @ “my STRING”;

It’s and NXConstantString. NXConstantString *myString = @ “my string”;

19.

Explain What Is #import?

Answer»

#import is a C pre-processor construct to AVOID MULTIPLE inclusions of the same file.

#import is a C pre-processor construct to avoid multiple inclusions of the same file.

20.

Explain What Is An Accessor Methods?

Answer»

Accessor methods are methods belonging to a class that enables you to GET and SET the values of INSTANCE VALUABLE contained within the class.

Accessor methods are methods belonging to a class that enables you to get and set the values of instance valuable contained within the class.

21.

Mention Which Class Are Used To Establish A Connection Between Applications To The Web Server?

Answer»

The class USED to establish connection between applications to WEB SERVER are:

  • NSURL
  • NSURL REQUEST
  • NSURL CONNECTION

The class used to establish connection between applications to web server are:

22.

Explain What Is Parsing And Mention Which Class Can We Use For Passing Of Xml In Iphone?

Answer»

PARSING is the PROCESS referred to access the data in the XML ELEMENT. We can use class “NSXML” PARSER for PASSING XML in iphone.

Parsing is the process referred to access the data in the XML element. We can use class “NSXML” parser for passing XML in iphone.

23.

Explain What Is The Difference Between Polymorphism And Abstraction?

Answer»

Abstraction in OOP is the PROCESS of reducing the unwanted data and maintaining only the RELEVANT data for the users while polymorphism ENABLES an OBJECT to execute their FUNCTIONS in two or more forms.

Abstraction in OOP is the process of reducing the unwanted data and maintaining only the relevant data for the users while polymorphism enables an object to execute their functions in two or more forms.

24.

Explain What Is The Protocol In Objective C?

Answer»

In Objetive-C, a protocol is a language feature, that provides multiple INHERITANCES in a single INHERITANCE language.

OBJECTIVE C supports TWO types of protocol:

  1. Ad HOC protocols known as informal protocol
  2. Compiler protocols known as a formal protocol

In Objetive-C, a protocol is a language feature, that provides multiple inheritances in a single inheritance language.

Objective C supports two types of protocol:

25.

Explain What Is Oop?

Answer»

OOP means Object Oriented PROGRAMMING; it is a type of programming technique that helps to manage a set of objects in a system. With the help of various programming LANGUAGES, this METHOD helps to develop several COMPUTER programs and APPLICATIONS.

OOP means Object Oriented Programming; it is a type of programming technique that helps to manage a set of objects in a system. With the help of various programming languages, this method helps to develop several computer programs and applications.

26.

Explain What Objective-c Program Basically Consists Of?

Answer»

Objective-C program basically consists of:

Objective-C program basically consists of: