Pointer to an array :
Code:
# include <stdio.h>
# define N 3
int main (void)
(
int t [2] [N] = ((14, 19, 15), (21, 11, 2009));
int (* p) [N] = & t [1];
printf ( "% d \ n", (* p) [2]);
return 0;
)
Array of pointers to arrays :
Code:
# include <stdio.h>
# define N 3
int main (void)
(
int t0 [5] = (55, 33, 75, 21, 29);
int t1 [5] = (8, 23, 45, 54, 69);
/ * P is an array of 2 pointers to tables 5 int * /
int (* p [2]) [5];
/ * Test * /
p [0] = & t0;
p [1] = & t1;
printf ( "% d% d \ n", (* p [0]) [3], (* p [1]) [4]);
return 0;
)
Bookmarks