Results 1 to 4 of 4

Thread: please help me.....

  1. #1
    hadi11's Avatar
    hadi11 is offline Senior Member+
    Last Online
    25th September 2024 @ 10:38 PM
    Join Date
    24 Mar 2010
    Location
    tandoallahyar
    Posts
    121
    Threads
    6
    Credits
    17
    Thanked
    10

    Default please help me.....

    is sawal ka jawab chahea please help...



    Assume that an integer needs four bytes, a real number needs eight bytes, and
    a char needs one byte. Assume the following definitions and declarations:

    struct nametype {
    char first[10];
    char midint;
    char last[20];
    };
    struct person {
    struct nametype name;
    int birthday[2];
    struct nametype parents[2];
    int incode;
    int numchildren;
    char address[20];
    char city[10];
    char state[2];
    };
    struct person p[100];

    If the starting address of p is 100, what are the addresses of each of the
    following?
    (a) p[10]
    (b) p[20].name.midinit
    (c) p[20].income
    (d) p[20].address[5]
    (e) p[5].parents[1].last[10]

  2. #2
    lonelyplanet is offline Senior Member+
    Last Online
    31st December 2021 @ 12:01 PM
    Join Date
    02 Dec 2018
    Gender
    Male
    Posts
    358
    Threads
    6
    Credits
    1,065
    Thanked
    6

    Default

    Quote hadi11 said: View Post
    is sawal ka jawab chahea please help...



    Assume that an integer needs four bytes, a real number needs eight bytes, and
    a char needs one byte. Assume the following definitions and declarations:

    struct nametype {
    char first[10];
    char midint;
    char last[20];
    };
    struct person {
    struct nametype name;
    int birthday[2];
    struct nametype parents[2];
    int incode;
    int numchildren;
    char address[20];
    char city[10];
    char state[2];
    };
    struct person p[100];

    If the starting address of p is 100, what are the addresses of each of the
    following?
    (a) p[10]
    (b) p[20].name.midinit
    (c) p[20].income
    (d) p[20].address[5]
    (e) p[5].parents[1].last[10]

  3. #3
    Haseeb Alamgir's Avatar
    Haseeb Alamgir is offline Super Moderator
    Last Online
    Yesterday @ 02:07 PM
    Join Date
    09 Apr 2009
    Location
    KARACHI&
    Gender
    Male
    Posts
    19,624
    Threads
    429
    Credits
    41,943
    Thanked
    1813

    Default

    بہت شکریہ مندرجہ بالا لنک مہیا فرمانے کا
    امید کی جاتی ہےکہ برادر کا مسلہ حل ہو جائے گا

    یا
    ہم اس کتاب کو ڈاؤن لوڈ کر سکتے ہیں
    پرنٹ کرنے کی سہولت تو نظر آئی ہے

  4. #4
    hassannasir is offline Senior Member+
    Last Online
    10th October 2024 @ 06:12 PM
    Join Date
    06 Jul 2020
    Gender
    Male
    Posts
    176
    Threads
    56
    Credits
    758
    Thanked
    0

    Default

    valid question

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •