Namespaces
Variants
Views
Actions

Difference between revisions of "c/keyword"

From cppreference.com
< c
(C has neither namespaces nor classes)
m (see also C++)
Line 59: Line 59:
  
 
Note that digraphs {{tt|<%}}, {{tt|%>}}, {{tt|<:}}, {{tt|:>}}, {{tt|%:}}, and {{tt|%:%:}} provide an [[c/language/operator_alternative|alternative way to represent standard tokens]].
 
Note that digraphs {{tt|<%}}, {{tt|%>}}, {{tt|<:}}, {{tt|:>}}, {{tt|%:}}, and {{tt|%:%:}} provide an [[c/language/operator_alternative|alternative way to represent standard tokens]].
 +
 +
===See also===
 +
{{dsc begin}}
 +
{{dsc see cpp | cpp/keyword}}
 +
{{dsc end}}
  
 
[[de:c/keyword]]
 
[[de:c/keyword]]

Revision as of 08:06, 3 June 2014

This is a list of reserved keywords in C. Since they are used by the language, these keywords are not available for re-definition.

auto
break
case
char
const
continue
default
do
double
else
enum
extern

float
for
goto
if
inline (since C99)
int
long
register
restrict (since C99)
return
short

signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while

_Alignas (since C11)
_Alignof (since C11)
_Atomic (since C11)
_Bool (since C99)
_Complex (since C99)
_Generic (since C11)
_Imaginary (since C99)
_Noreturn (since C11)
_Static_assert (since C11)
_Thread_local (since C11)

Also, each name that contains a double underscore __ or begins with an underscore followed by an uppercase letter is always reserved to the implementation and should not be used as an identifier. Each name that begins with an underscore is reserved to the implementation for use as a name of a global entity; such names may be used as names of local variables, names of data members in a structure, etc.

Note that digraphs <%, %>, <:, :>, %:, and %:%: provide an alternative way to represent standard tokens.

See also

C++ documentation for keyword