1 2 3 4 5 6 7 8 9 10

An Array of Strings
char* name[] = {"George","Mark","Peter","Jimmy",NULL};

IMAGE imgs/lec-07.sli01.gif

To check syntax of C declarations use: cmput>~tony/Cdecl/cdecl

pa

IMAGE imgs/lec-07.sli02.gif

0

19

cdecl>explain int (*pa)[20];
declare pa as a pointer to array 20 of int

cdecl>explain int* pa[5];
declare pa as array 5 of pointer to int

IMAGE imgs/lec-07.sli03.gif

January 22, 1999

Page 1

copyright UoA