You are on page 1of 3

Appendix C: C Language Summary

auto Defines a local variable as having a local lifetime.


break Passes control out of the compound statement.
case Branches control.
char Basic signed integer type.
const Makes variable value or pointer parameter unmodifiable.
continue Passes control to the begining of the loop.
default Branches control.
do Do-while loop.
double Double precision floating point data type.
else Conditional branching statement.
enum Defines a set of constants of type int.
extern Indicates that an identifier is defined elsewhere.
float Single precision floating point data type.
for For loop.
goto Unconditionally transfer control.
if Conditional branching statement.
inline Inline expansion of function calls for speed.
int Basic single precision signed integer data type.
long Type modifier for integers.
register Tells the compiler to store the variable being declared in a CPU register.
restrict Restrict pointers so that they can not be aliased.
return Exits the function.
short Type modifier for integers.
signed Type modifier for integers.
sizeof Returns the size of the expression or type.
static Preserves variable value to survive after its scope ends.
struct Groups variables into a single composite record.
switch Branches control.
typedef Creates a new type.
union Groups variables which share the same storage space.
unsigned Type modifier for integers.
void Empty data type.
volatile Indicates that a variable can be changed by a background routine.
while While loop.
120 c programming techniques

Precedence Operator Description Associativity


1 ++ −− Suffix/postfix increment and decrement Left-to-right
() Function call
[] Array subscripting
. Structure and union member access
−> Structure and union member access through pointer
(type){ list } Compound literal
2 ++ −− Prefix increment and decrement Right-to-left
+− Unary plus and minus
! ~ Logical NOT and bitwise NOT
(type) Type cast
* Indirection (dereference)
& Address-of
sizeof Size-of
_Alignof Alignment requirement
3 * /% Multiplication, division, and remainder Left-to-right
4 +− Addition and subtraction
5 << >> Bitwise left shift and right shift
6 < <= For relational operators < and ≤ respectively
> >= For relational operators > and ≥ respectively
7 == != For relational = and �= respectively
8 & Bitwise AND
9 ^ Bitwise XOR (exclusive or)
10 | Bitwise OR (inclusive or)
11 && Logical AND
12 || Logical OR
13 ?: Ternary conditional Right-to-Left
14 = Simple assignment
+= −= Assignment by sum and difference
* /= %=
= Assignment by product, quotient, and remainder
<<= >>= Assignment by bitwise left shift and right shift
&= \^= = | Assignment by bitwise AND, XOR, and OR
15 , Comma Left-to-right
appendix c: c language summary 121

<assert.h> Conditionally compiled macro that compares its argument to zero


<complex.h> Complex number arithmetic
<ctype.h> Functions to determine the type contained in character data
<errno.h> Macros reporting error conditions
<fenv.h> Floating-point environment
<float.h> Limits of float types
<inttypes.h> Format conversion of integer types
<iso646.h> Alternative operator spellings
<limits.h> Sizes of basic types
<locale.h> Localization utilities
<math.h> Common mathematics functions
<setjmp.h> Nonlocal jumps
<signal.h> Signal handling
<stdalign.h> alignas and alignof convenience macros
<stdarg.h> Variable arguments
<stdatomic.h> Atomic types
<stdbool.h> Boolean type
<stddef.h> Common macro definitions
<stdint.h> Fixed-width integer types
<stdio.h> Input/output
<stdlib.h> Memory management, program utilities, string conversions, random numbers
<stdnoreturn.h> noreturn convenience macros
<string.h> String handling
<tgmath.h> Type-generic math (macros wrapping math.h and complex.h)
<threads.h> Thread library
<time.h> Time/date utilities
<uchar.h> UTF-16 and UTF-32 character utilities
<wchar.h> Extended multibyte and wide character utilities
<wctype.h> Wide character classification and mapping utilities

root@parabolaiso / # man stdio.h

stdio.h(0P) POSIX Programmer’s Manual stdio.h(0P)

PROLOG
This manual page is part of the POSIX Programmer’s Manual. The Linux
implementation of this interface may differ (consult the corresponding
Linux manual page for details of Linux behavior), or the interface may...
.
.
.

You might also like