Results 1 to 4 of 4

Thread: please help me.....

  1. #1
    hadi11's Avatar
    hadi11 is offline Senior Member+
    Last Online
    26th November 2023 @ 01:06 AM
    Join Date
    24 Mar 2010
    Location
    tandoallahyar
    Posts
    120
    Threads
    6
    Credits
    13
    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 @ 08:57 PM
    Join Date
    09 Apr 2009
    Location
    KARACHI&
    Gender
    Male
    Posts
    19,273
    Threads
    411
    Credits
    39,647
    Thanked
    1813

    Default

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

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

  4. #4
    hassannasir is offline Senior Member+
    Last Online
    30th December 2023 @ 06:31 PM
    Join Date
    06 Jul 2020
    Gender
    Male
    Posts
    171
    Threads
    53
    Credits
    686
    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
  •