2. Embedded SQL for C : C Variables and Data Types : Variable and Type Declarations : Pointer Declarations Syntax
 
Share this page                  
Pointer Declarations Syntax
The syntax of a C pointer declaration is:
* {*} pointer_name
In the context of a simple variable declaration, the syntax is:
type_specification *{*} pointer_variable_name;
In the context of a type declaration, the syntax is:
typedef type_specification *{*} pointer_type_name;
Syntax Notes:
You can specify any number of asterisks. The preprocessor notes the number specified when the variable or type is declared. When the variable is later referenced, it must have the correct number of asterisks.
You can initialize a pointer variable, but the preprocessor does not verify that the initial value is an address.
A pointer to the char data type is considered to be the pseudo character string type.
Do not put grouping parentheses in variable references or variable declarations.
You can use arrays of pointers.
Example: Pointer declarations usage
extern int min_value;
 int *valptr = &min_value;
 char *tablename = "employee";