C Pointer Arrays Initializtion -


im quite confused difference between these 2 initializations:

    int (*p)[10]; 

and

    int *p[10] 

i know both can point 2d array element count in row 10....

to elaborate bit on correct answers here already:

the first line:

 int (*p)[10]; 

declares "p" pointer memory address of array capacity of 10 ints. can read in english as: "integer-pointer 'p' points 10 sequential ints in memory".

the second line:

int *p[10] 

declares "p[]" array of 10 pointers integers. array of memory addresses point integers. in case, "p" sequence of 10 pointers in memory (which happen memory addresses of other ints).


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -