1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pointer declaration

Discussion in 'C' started by parvathynp, Mar 3, 2011.

  1. parvathynp

    parvathynp New Member

    Joined:
    Mar 3, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    1) int (*p)(char *a[]);

    2) int *p(char a[]);

    3) int *(*p[10])(char *a[]);

    4) char (*p)[10][20];

    5) float *(*x[20])(int *a);

    What do these statements mean?
     
  2. DRK

    DRK New Member

    Joined:
    Apr 13, 2012
    Messages:
    44
    Likes Received:
    3
    Trophy Points:
    0
    1) Pointer to a function.
    Function parameter type: array of pointers to char.
    Function return type: int.

    2) Function prototype.
    Function parameter type: array of chars.
    Function return type: pointer to int.

    3) 10-element array of pointers to a function.
    Function parameter type: array of pointers to char.
    Function return type: pointer to int.

    4) Pointer to 2-dimensional array of chars (10 x 20 elements).

    5) 20-element array of pointers to a function.
    Function parameter type: pointer to int.
    Function return type: pointer to float.
     

Share This Page