Character sets:
The basic C source character set includes the following characters:
- Letters:
a
–z
,A
–Z
,_
- Digits:
0
–9
- Punctuation:
~ ! @ # % ^ & * ( ) - + = : ; " ' < > , . ? | / \ { } [ ]
- Whitespace: space, horizontal tab, vertical tab, form feed, newline
Newline indicates the end of a text line; it need not correspond to an actual single character, although for convenience C treats it as one.
Additional multibyte encoded characters may be used, but are not portable. The latest C standard (C11) allows multinational Unicode characters to be embedded portably within C source text by using a
\uDDDD
encoding (where DDDD
denotes a Unicode character code), although this feature is not yet widely implemented.
The basic C execution character set contains the same characters, along with representations for alert, backspace, and carriage return. Run-time support for extended character sets has increased with each revision of the C standard.
Keywords
C89 has 32 keywords (reserved words with special meaning):
|
|
|
|
C99 adds five more keywords:
|
|
C11 adds seven more keywords:
|
|
OPERATORS :
Main article: Operators in C and C++
C supports a rich set of operators, which are symbols used within an expression to specify the manipulations to be performed while evaluating that expression. C has operators for:
- arithmetic:
+
,-
,*
,/
,%
- assignment:
=
- augmented assignment:
+=
,-=
,*=
,/=
,%=
,&=
,|=
,^=
,<<=
,>>=
- bitwise logic:
~
,&
,|
,^
- bitwise shifts:
<<
,>>
- boolean logic:
!
,&&
,||
- conditional evaluation:
? :
- equality testing:
==
,!=
- calling functions:
( )
- increment and decrement:
++
and--
- member selection:
.
,->
- object size:
sizeof
- order relations:
<
,<=
,>
,>=
- reference and dereference:
&
,*
,[ ]
- sequencing:
,
- subexpression grouping:
( )
- type conversion:
(typename)
No comments:
Post a Comment