Pointers, arrays and structures

pointer


For Type T, T * is the "pointer to type T", that is to say, a type of stored object address a type T is T * variables. E.g:

char c = 'a';

char * p = & c; // p c holds address

Array of pointers to functions and more complex representation

int * pi; // pointer to int

char ** char; // pointer to a pointer to a character

int * ap [15]; // Pointer to an array of 15

int (* fq) (* char); // pointer to function, to function as a char parameter and returns an int

int * q (* char); // char type has a function that returns a pointer to the Int

The operation of the pointer indirection belongs, belongs indirection operator (prefix) * one yuan.

Guess you like

Origin www.cnblogs.com/yanying-fly/p/11570220.html