Thread: array pointer

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    70

    array pointer

    With reference to the following link
    http://gd.tuwien.ac.at/languages/c/p...ll/node10.html

    we have the following code
    Code:
    char *name[10];
    the note says
    if each pointer in name iset to point to a 20 element array then an only then will 200 chars be set aside (+10 elements)

    where is the +10 elements coming from?

  2. #2
    ---
    Join Date
    May 2004
    Posts
    1,379
    It is like a 2D array. each element
    Code:
    [0],[1],[2], etc
    is pointing to another 20 elements each.
    10x20=200

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    127
    >where is the +10 elements coming from?
    The pointers of the name array.
    When writing a specialization, be careful about its location; or to make it compile will be such a trial as to kindle its self-immolation.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 05-29-2009, 05:48 AM
  2. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  3. pointer to array of structs
    By Luken8r in forum C Programming
    Replies: 2
    Last Post: 01-08-2008, 02:05 PM
  4. towers of hanoi problem
    By aik_21 in forum C Programming
    Replies: 1
    Last Post: 10-02-2004, 01:34 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 09:48 AM