Friday, July 29, 2016

C Basics - Complex and Abstract Declarations in C

A complex declaration is an identifier qualified by more than one array, pointer, or function modifier. You can apply various combinations of array, pointer, and function modifiers to a single identifier.
int *var[5];
int (*var)[5];
long *var( long, long );
long (*var)( long, long );

An abstract declaration is a declaration without an identifier, consisting of one or more pointer, array, or function modifiers. The pointer modifier (*) always precedes the identifier in a declaration; array ([ ]) and function ( ( ) ) modifiers follow the identifier.
int *;
int *[4];
int (*) [4];

Related topics:
Memory Management in C   |   Incomplete Type in C   |   Lifetime, Scope, Visibility and Linkage in C   |   Namespace in C   |   Storage of Data Types in C   |   Standard Library in C

List of topics: C Programming

No comments:

Post a Comment