What is a qualifier in C.

Declarators and variable declarations

The following section describes the form and meaning of declarations for the variable types in this list. In particular, the remaining sections explain how to declare:

Variable typedescription
Simple variablesSingle value tags of the "integer" or "floating point" type
ArraysVariables that consist of a collection of elements of the same type
pointerVariables that point to other variables and contain the locations of other variables (in the form of addresses) instead of values
Enumeration variablesSimple integer type variables that contain one value from a set of named integer constants
StructuresVariables, which consist of a collection of values ​​that can be of different types
UnionsVariables that consist of several values ​​of different types that occupy the same memory space

A Declarator is the part of a declaration that specifies the name to be inserted in the program. This can include modifiers such as (pointer-to) and any Microsoft calling convention keywords.

Microsoft specific

In this declarator is

the type specifier, and are the modifiers and is the name of the identifier.

End Microsoft-specific

You use declarators to declare arrays of values, pointers to values, and functions that return values ​​of a specified type. Declarators appear in the array and pointer declarations described later in this section.

syntax

:
opt

:


opt

opt

:
opt
opt

:

If a declarator consists of an unchanged identifier, the declared element has a base type. If there is an asterisk () to the left of an identifier, the type is changed to a pointer type. If the identifier is followed by square brackets (), the type is changed to an array type. If the identifier is followed by parentheses, the type is changed to a function type. For more information about interpreting the precedence in the declarations, see Interpreting More Complex Declarators.

Each declarator declares at least one identifier. A declarator must contain a type specifier to be a full declaration. The type specifier specifies the type of the elements of an array type, the type of the object addressed by a pointer type, or the return type of a function.

Array and pointer declarations are described in more detail later in this section. The following examples illustrate a few simple forms of declarators:

Microsoft specific

The Microsoft C compiler allows an unlimited number of declarators that can change an arithmetic, structure, or union type. The number is only limited by the available memory.

End Microsoft-specific

See also

Declarations and types