What is the Difference between Array of pointers and pointer array?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saravanakumar
    New Member
    • Sep 2006
    • 11

    What is the Difference between Array of pointers and pointer array?

    Hi,

    Can any one explain me the difference between Array of pointers and pointer array?

    Regards
    Saravanan
  • devikacs
    New Member
    • Jun 2007
    • 96

    #2
    Originally posted by saravanakumar
    Hi,

    Can any one explain me the difference between Array of pointers and pointer array?

    Regards
    Saravanan
    An array of pointers is an array, where the elements are pointers to some memory location.
    for eg-
    it would be something like
    int* parr[10];
    here parr[0],parr[1],etc are pointer variables


    A pointer to an array is when a pointer is pointing to the starting address of an array.
    eg, let int arr[10] be an array. A pointer that points to arr[0], would be a pointer to an array

    Comment

    • saravanakumar
      New Member
      • Sep 2006
      • 11

      #3
      Thanks for your reply

      Regards
      Saravanan

      Comment

      Working...