Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8049023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:39:58+00:00 2026-06-05T06:39:58+00:00

id In Objective-C, object identifiers are of a distinct data type: id. This type

  • 0

id
In Objective-C, object identifiers are of a distinct data type: id. This type is the general type for any kind of object regardless of class and can be used for instances of a class and for class objects themselves.

id anObject;

Till here its simple and clear


For the object-oriented constructs of Objective-C, such as method return values, id replaces int as the default data type. (For strictly C constructs, such as function return values, int remains the default type.)

didn’t understand what its talking about id replaces int? and in last inside brackets int remains the default value?


The keyword nil is defined as a null object, an id with a value of 0. id, nil, and the other basic types of Objective-C are defined in the header file objc/objc.h.

id is defined as pointer to an object data structure:

typedef struct objc_object {
    Class isa;
} *id;

the above is not a obj-c syntax what is it and what it is explaining?


Every object thus has an isa variable that tells it of what class it is an instance. Since the Class type is itself defined as a pointer:

typedef struct objc_class *Class;

the isa variable is frequently referred to as the “isa pointer.”

also didn’t understand this last para.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:39:59+00:00Added an answer on June 5, 2026 at 6:39 am

    For the object-oriented constructs of Objective-C, such as method return values, id replaces int as the default data type. (For strictly C constructs, such as function return values, int remains the default type.)

    Your book’s just being a bit confusing here. All it’s saying is that if you’re working with objects and you don’t want to get more specific, id is a good data type to use.

    id is defined as pointer to an object data structure:

    typedef struct objc_object {
        Class isa;
    } *id;
    

    the above is not a obj-c syntax what is it and what it is explaining?

    That’s the internal representation of an object. Your book is trying to show that an objective C object isn’t magic: under the surface it’s just a struct. The data type id is a pointer to such a struct.

    Every object thus has an isa variable that tells it of what class it is an instance. Since the Class type is itself defined as a pointer:

    typedef struct objc_class *Class;

    the isa variable is frequently referred to as the “isa pointer.”

    In its internal data structure, each object has a pointer to another object that represents its class.

    You don’t need to know this stuff if you’re just interested in programming in Objective-C (at least not while you’re learning). It does come in handy if you’re doing some advanced stuff, such as when you’re interacting with the Objective-C runtime directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I parse this into an objective-c object most efficiently? 2010-07-13T11:22:33-07:00 This is
How do I convert a non-object objective-c opaque data type (like CGImageRef, CGPDFPageRef) opaque
How can iterate through an NSString object in Objective c whiling maintaining an index
Is there a way in objective-c/Cocoa to alloc an object when the class name
Why is the Objective-C object type called 'id'? As opposed to, say, 'object'?
i get many warnings of type: '__strong' only applies to objective-c object or block
I wanted to know , How exactly does an Objective C object gets created.
I want to use/reuse C++ object with Objective-C. I have a hello.h that has
In Objective-C I see [object retain]; What does sending a retain message to an
Objective-C uses a sophisticated message-passing system when one object calls a method on another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.