Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Programming in C

This is a discussion on Programming in C within the C and C++ forums, part of the Programming Talk category; what is the difference between array of pointers and pointer in array?...

  1. #1
    ANANTHA KRISHNAN is offline Junior Member Array
    Join Date
    Dec 2006
    Answers
    1

    Programming in C

    what is the difference between array of pointers and pointer in array?


  2. #2
    sammy is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    144
    array of pointers
    As an example we can say
    char *argv[];
    is an array of pointer to char.

    Hope this helps you.


  3. #3
    chaisen2006 is offline Junior Member Array
    Join Date
    Nov 2006
    Answers
    3
    hi there!!

    int a=1,b=2,c=3;
    int *arr[3];
    arr[0]=&a;
    arr[1]=&b;
    arr[2]=&c;
    this forms the array of pointer...ie an array which contains a set of addresses....in this case address of set of intergers............


    pointer of array!!
    a[]={1,2,3,4};
    int *p;//pointer to an array//
    p=a;//in this it will contain the base address of a// ie address of a[0];


  4. #4
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122
    Friend,Hope you would have got a clear understanding from the replies given by our friends here in this thread. If you have any more query post it here and we would clarify the same.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...