|
|
declarator: pointer[opt] direct-declarator direct-declarator: identifier (declarator) direct-declarator [constant-expression[opt]] direct-declarator (parameter-type-list) direct-declarator (identifier-list[opt]) pointer:type-qualifier-list[opt]
type-qualifier-list[opt] pointer
charp is a pointer to type char. p contains the address of a char object.p;
Care should be taken when pointer declarations are qualified with const:
const intdeclares a pointer to a const-qualified ``read-only'' int.pci;
intdeclares a pointer-to-int that is itself ``read-only''.const cpi;
chart points to a character pointer.t;
int (f is a pointer to a function that returns an int.f)();
voidA pointer to void may be converted to or from a pointer to any object or incomplete type, without loss of information. This generic pointer behavior was previously carried out by char![]()
int ia[10];ia is an array of 10 integers.
char d[4][10];d is an array of 4 arrays of 10 characters each.
charp is an array of seven character pointers.p[7];
void srand(unsigned int seed);
)
and as such
serves solely as documentation.
int rand(void);
int strcmp(const char
, const char
);
void (
signal(int, void (
)(int)))(int);
int fprintf(FILE
stream, const char
format, . . .);
note the use of ellipsis ( . . . ) to indicate an unknown number of arguments.