Declarators
Declarators include:
declarator: pointeropt direct-declarator direct-declarator: identifier (declarator) direct-declarator [constant-expressionopt ] direct-declarator (parameter-type-list) direct-declarator (identifier-listopt ) pointer: * type-qualifier-listopt * type-qualifier-listopt pointer
char *p;p is a pointer to type char. p contains the address of a char object.
Care should be taken when pointer declarations are qualified with const:
const int *pci;declares a pointer to a const-qualified ``read-only'' int.
int *const cpi;declares a pointer-to-int that is itself ``read-only''.
char **t;t points to a character pointer.
int (*f)();f is a pointer to a function that returns an int.
void *A 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 *; a pointer to void has the same representation and alignment requirements as a pointer to a character type.
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.
char *p[7];p is an array of seven character pointers.
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.