C Language
- The C programming Language by Brian W. Kernighan and Dennis M. Ritchie
- C: A Reference Manual 5th
- Robert C. Seacord
- FAQs, Help, and Tutorials
- Embedded C Coding Standard
- c99/n1256
- Re-entrant
- Pointers to Multidimensional Arrays
- Statement Expression
- Documentation Tool
- API
- Readline
- Macro
- Varargs
- Function Declaration
- Initialization
- Inline
- Inline Assembly
- Storage Class Modifiers
- qualifier
- const char
- static global constant
- Enumeration Constants
- lvalue/rvalue
- Endian
- Struct Member Alignment
- sizeof
- Object-Orented C
- Metaprogramming
- Assert/ NDEBUG
- MISC
- Reentrance
- A reentrant function does not hold static data over successive calls, nor does it return a pointer to static data. All data is provided by the caller of the function. A reentrant function must not call non-reentrant functions.
- A non-reentrant function can often, but not always, be identified by its external interface and its usage. For example, the strtok subroutine is not reentrant, because it holds the string to be broken into tokens. The ctime subroutine is also not reentrant; it returns a pointer to static data that is overwritten by each call.
- Basic guidelines
- Do not access mutable global or function-static variables.
- Do not self-modify code.
- Do not invoke another function that is itself non-reentrant.
- type casting
- C-style cast
- typedef vs. define
typedef int *t1;
#define t2 int *
t1 a, b; /* a is 'int*' and b is 'int*' */
t2 c, d; /* c is 'int*' and d is 'int' */
- Conditional Compilation
#ifdef | |
#if defined (macro1) |
- file magic number
- LP64 vs. LLP64: for LP64, long is 64 bits; for LLP64, long long is 64 bits
page revision: 127, last edited: 11 May 2016 02:36