# C Programming/Statements

A **statement** is a command given to the computer that instructs the
computer to take a specific action, such as display to the screen, or
collect input. A computer program is made up of a series of statements.

In C, a statement can be any of the following:

## Labeled Statements

A statement can be preceded by a label. Three types of labels exist in
C.

A simple identifier followed by a colon (`:`) is a label. Usually, this
label is the target of a `goto` statement.

Within `switch` statements, `case` and `default` labeled statements
exist.

A statement of the form

`case` *constant-expression* `:` *statement*

indicates that control will pass to this statement if the value of the
control expression of the `switch` statement matches the value of the
*constant-expression*. (In this case, the type of the
*constant-expression* must be an integer or character.)

A statement of the form

`default` `:` *statement*

indicates that control will pass to this statement if the control
expression of the `switch` statement does not match any of the
*constant-expressions* within the `switch` statement. If the `default`
statement is omitted, the control will pass to the statement following
the `switch` statement. Within a `switch` statement, there can be only
one `default` statement, unless the `switch` statement is within another
`switch` statement.

## Compound Statements

A *compound statement* is the way C groups multiple statements into a
single statement. It consists of multiple statements and declarations
within braces (i.e. `{` and `}`). In the ANSI C Standard of 1989-1990, a
compound statement contained an optional list of declarations followed
by an optional list of statements; in more recent revisions of the
Standard, declarations and statements can be freely interwoven through
the code. The body of a function is also a compound statement by rule.

## Expression Statements

An *expression statement* consists of an optional expression followed by
a semicolon (`;`). If the expression is present, the statement may have
a value. If no expression is present, the statement is often called the
*null statement*.

The `printf` function calls are expressions, so statements such as
`printf ("Hello World!\n");` are expression statements.

## Selection Statements

Three types of selection statements exist in C:

`if` `(` *expression* `)` *statement*

In this type of if-statement, the sub-statement will only be executed
iff the expression is non-zero.

`if` `(` *expression* `)` *statement* `else` *statement*

In this type of if-statement, the first sub-statement will only be
executed iff the expression is non-zero; otherwise, the second
sub-statement will be executed. Each `else` matches up with the closest
unmatched `if`, so that the following two snippets of code are not
equal:

``` c
 if (expression)
   if (secondexpression) statement1;
 else
   statement2;

 if (expression)
   {
     if (secondexpression) statement1;
   }
 else
   statement2;
```

because in the first, the `else` statement matches up with the if
statement that has `secondexpression` for a control, but in the second,
the braces force the `else` to match up with the if that has
`expression` for a control.

Switch statements are also a type of selection statement. They have the
format

`switch` `(` *expression* `)` *statement*

The expression here is an integer or a character. The statement here is
usually compound and it contains case-labeled statements and optionally
a default-labeled statement. The compound statement should not have
local variables as the jump to an internal label may skip over the
initialization of such variables.

## Iteration Statements

C has three kinds of iteration statements. The first is a
while-statement with the form

`while` `(` *expression* `)` *statement*

The substatement of a while runs repeatedly as long as the control
expression evaluates to non-zero at the beginning of each iteration. If
the control expression evaluates to zero the first time through, the
substatement may not run at all.

The second is a do-while statement of the form

`do` *statement* `while` `(` *expression* `)` `;`

This is similar to a while loop, except that the controlling expression
is evaluated at the end of the loop instead of the beginning and
consequently the sub-statement must execute at least once.

The third type of iteration statement is the for-statement. In ANSI C
1989, it has the form

`for` `(` *expression~opt~* `;` *expression~opt~* `;` *expression~opt~*
`)` *statement*

In more recent versions of the C standard, a declaration can substitute
for the first expression. The *opt* subscript indicates that the
expression is optional.

The statement

``` c
  for (e1; e2; e3)
    s;
```

is the rough equivalent of

``` c
  {
    e1;
    while (e2)
      {
        s;
        e3;
      }
  }
```

except for the behavior of `continue` statements within `s`.

The `e1` expression represents an initial condition; `e2` a control
expression; and `e3` what to happen on each iteration of the loop. If
`e2` is missing, the expression is considered to be non-zero on every
iteration, and only a `break` statement within `s` (or a call to a
non-returning function such as `exit` or `abort`) will end the loop.

## Jump Statements

C has four types of jump statements. The first, the `goto` statement, is
used sparingly and has the form

`goto` *identifier* `;`

This statement transfers control flow to the statement labeled with the
given identifier. The statement must be within the same function as the
`goto`.

The second, the break statement, with the form

`break` `;`

is used within iteration statements and `switch` statements to pass
control flow to the statement following the while, do-while, for, or
switch.

The third, the continue statement, with the form

`continue` `;`

is used within the substatement of iteration statements to transfer
control flow to the place just before the end of the substatement. In
`for` statements the iteration expression (`e3` above) will then be
executed before the controlling expression (`e2` above) is evaluated.

The fourth type of jump statement is the `return` statement with the
form

`return` *expression~opt~* `;`

This statement returns from the function. If the function return type is
`void`, the function may not return a value; otherwise, the expression
represents the value to be returned.


# C Programming/Side effects and sequence points

In C and more generally in computer science, a function or expression is
said to have a **side effect** if it modifies a state outside its scope
or has an *observable* interaction with its calling functions or the
outside world. By convention, returning a value has an effect on the
calling function, but this is usually not considered as a side effect.

Some side effects are:

-   Modification of a global variable or static variable
-   Modification of function arguments
-   Writing data to a display or file
-   Reading data
-   Calling other side-effecting functions

In the presence of side effects, a program\'s behaviour may depend on
history; that is, the order of evaluation matters. Understanding and
debugging a function with side effects requires knowledge about the
context and its possible histories.[^1][^2]

A **sequence point** defines any point in a computer program\'s
execution at which it is guaranteed that all side effects of previous
evaluations will have been performed, and no side effects from
subsequent evaluations have yet been performed. They are often mentioned
in reference to C, because they are a core concept for determining the
validity and, if valid, the possible results of expressions. Adding more
sequence points is sometimes necessary to make an expression defined and
to ensure a single valid order of evaluation.

1.  An expression\'s evaluation can be **sequenced before** that of
    another expression, or equivalently the other expression\'s
    evaluation is **sequenced after** that of the first.
2.  The expressions\' evaluation is **indeterminately sequenced,**
    meaning one is sequenced before the other, but which is unspecified.
3.  The expressions\' evaluation is **unsequenced.**

The execution of unsequenced evaluations can overlap, with catastrophic
undefined behavior if they share state. This situation can arise in
parallel computations, causing race conditions.

## Examples of ambiguity

Consider two functions `f()` and `g()`. In C, the `+` operator is not
associated with a sequence point, and therefore in the expression
`f()+g()` it is possible that either `f()` or `g()` will be executed
first. The comma operator introduces a sequence point, and therefore in
the code `f(),g()` the order of evaluation is defined: first `f()` is
called, and then `g()` is called.

Sequence points also come into play when the same variable is modified
more than once within a single expression. An often-cited example is the
C expression `i=i++`, which apparently both assigns `i` its previous
value and increments `i`. The final value of `i` is ambiguous, because,
depending on the order of expression evaluation, the increment may occur
before, after, or interleaved with the assignment. The definition of a
particular language might specify one of the possible behaviors or
simply say the behavior is undefined. In C, evaluating such an
expression yields undefined behavior.[^3]

In C[^4], sequence points occur in the following places.

1.  Between evaluation of the left and right operands of the && (logical
    AND), \|\| (logical OR) (as part of short-circuit evaluation), and
    comma operators. For example, in the expression
    `*p++ != 0 && *q++ != 0`, all side effects of the sub-expression
    `*p++ != 0` are completed before any attempt to access `q`.
2.  Between the evaluation of the first operand of the ternary
    \"question-mark\" operator and the second or third operand. For
    example, in the expression `a = (*p++) ? (*p++) : 0` there is a
    sequence point after the first `*p++`, meaning it has already been
    incremented by the time the second instance is executed.
3.  At the end of a full expression. This category includes expression
    statements (such as the assignment `a=b;`), return statements, the
    controlling expressions of `if`, `switch`, `while`, or `do`-`while`
    statements, and all three expressions in a `for` statement.
4.  Before a function is entered in a function call. The order in which
    the arguments are evaluated is not specified, but this sequence
    point means that all of their side effects are complete before the
    function is entered. In the expression `f(i++) + g(j++) + h(k++)`,
    `f` is called with a parameter of the original value of `i`, but `i`
    is incremented before entering the body of `f`. Similarly, `j` and
    `k` are updated before entering `g` and `h` respectively. However,
    it is not specified in which order `f()`, `g()`, `h()` are executed,
    nor in which order `i`, `j`, `k` are incremented. If the body of `f`
    accesses the variables `j` and `k`, it might find both, neither, or
    just one of them to have been incremented. (The function call
    `f(a,b,c)` is *not* a use of the comma operator; the order of
    evaluation for `a`, `b`, and `c` is unspecified.)
5.  At a function return, after the return value is copied into the
    calling context. (This sequence point is only specified in the C++
    standard; it is present only implicitly in C.)
6.  At the end of an initializer; for example, after the evaluation of
    `5` in the declaration `int a = 5;`.
7.  Between each declarator in each declarator sequence; for example,
    between the two evaluations of `a++` in `int x = a++, y = a++`.
    (This is *not* an example of the comma operator.)
8.  After each conversion associated with an input/output format
    specifier. For example, in the expression
    `printf("foo %n %d", &a, 42)`, there is a sequence point after the
    `%n` is evaluated and before printing `42`.

## References

## External links

-   Question 3.8 of the FAQ for
    comp.lang.c

[^1]: "Research Topics in Functional Programming" ed. D. Turner,
    Addison-Wesley, 1990, pp 17--42. Retrieved from:

[^2]:

[^3]: Clause 6.5#2 of the C99 specification: \"*Between the previous and
    next sequence point an object shall have its stored value modified
    at most once by the evaluation of an expression. Furthermore, the
    prior value shall be accessed only to determine the value to be
    stored.*\"

[^4]: Annex C of the C99 specification lists the circumstances under
    which a sequence point may be assumed.


# C Programming/Standard Library Reference

## Headers

### ANSI C (C89)/ISO C (C90)

  ------------------------------------------ ----------------------------------------
  `assert.h`         Verify program assertion file
  `ctype.h`           Character types file.
  **`errno.h`**     System error numbers file
  **`float.h`**     Floating types file
  **`limits.h`**   Implementation-defined constants file.
  `locale.h`         Category macros file.
  `math.h`             Mathematical declarations file.
  `setjmp.h`         Stack environment declarations file.
  `signal.h`         Signals file.
  `stdarg.h`         Handle variable argument list file.
  `stddef.h`         Standard type definitions file.
  `stdio.h`           Standard buffered input/output file.
  `stdlib.h`         Standard library definitions file.
  `string.h`         String operations file.
  `time.h`             Time types file.
  ------------------------------------------ ----------------------------------------

### ISO C (C94/C95), Amendment 1 (AMD1)

Very old compilers may not include some or all of these headers

  ------------------------------------------ ------------------------------------------------------
  **`iso646.h`**   Alternative spellings.
  `wchar.h`           Wide-character handling.
  `wctype.h`         Wide-character classification and mapping utilities.
  ------------------------------------------ ------------------------------------------------------

### ISO C (C99)

These are supported only in newer compilers

  -------------------------------------------- -----------------------------
  `complex.h`         Complex arithmetic.
  `fenv.h`               Floating-point environment.
  `inttypes.h`       Fixed size integer types.
  **`stdbool.h`**   Boolean type and values.
  **`stdint.h`**     Integer types.
  **`tgmath.h`**     Type-generic macros.
  -------------------------------------------- -----------------------------

### ISO C (C11)

These are supported only in newer compilers

  ---------------------------------------------------- ----------------------------------------------------------
  **`stdalign.h`**         Alignment keywords and macros.
  `stdatomic.h`             Atomic operations on data shared between threads.
  **`stdnoreturn.h`**   \_Noreturn function specifier macro.
  `threads.h`                 Support for multiple threads of execution.
  `uchar.h`                     Types and functions for manipulating Unicode characters.
  ---------------------------------------------------- ----------------------------------------------------------

## Table of functions

This table also includes function-like macros

### assert.h

+----------------------------------------------------------------------+
| -   `a                                                              |
| ssert` |
+----------------------------------------------------------------------+

### complex.h

+-------+-------+-------+-------+-------+-------+-------+-------+-------+
| -     | -     | -     | -   [ | -     | -     | -     | -     | -     |
|  [`ca | [`cat |   [`c | `cata | [`csi |   [`c |  [`cs | [`cim | [`cre |
| cos`] | anl`] | tanf` | nh`]( | nhl`] | logf` | qrt`] | agl`] | alf`] |
| (../c | (../c | ](../ | ../co | (../c | ](../ | (../c | (../c | (../c |
| omple | omple | compl | mplex | omple | compl | omple | omple | omple |
| x.h/F | x.h/F | ex.h/ | .h/Fu | x.h/F | ex.h/ | x.h/F | x.h/F | x.h/F |
| uncti | uncti | Funct | nctio | uncti | Funct | uncti | uncti | uncti |
| on_re | on_re | ion_r | n_ref | on_re | ion_r | on_re | on_re | on_re |
| feren | feren | efere | erenc | feren | efere | feren | feren | feren |
| ce#ca | ce#ca | nce#c | e#cat | ce#cs | nce#c | ce#cs | ce#ci | ce#cr |
| cos " | tan " | tan " | anh " | inh " | log " | qrt " | mag " | eal " |
| wikil | wikil | wikil | wikil | wikil | wikil | wikil | wikil | wikil |
| ink") | ink") | ink") | ink") | ink") | ink") | ink") | ink") | ink") |
| -     | -     | -     | -     | -     | -     | -     | -     | -     |
| [`cac |    [` |   [`c |    [` |  [`ct |   [`c | [`csq |    [` | [`cre |
| osf`] | ccos` | tanl` | catan | anh`] | logl` | rtf`] | conj` | all`] |
| (../c | ](../ | ](../ | hf`]( | (../c | ](../ | (../c | ](../ | (../c |
| omple | compl | compl | ../co | omple | compl | omple | compl | omple |
| x.h/F | ex.h/ | ex.h/ | mplex | x.h/F | ex.h/ | x.h/F | ex.h/ | x.h/F |
| uncti | Funct | Funct | .h/Fu | uncti | Funct | uncti | Funct | uncti |
| on_re | ion_r | ion_r | nctio | on_re | ion_r | on_re | ion_r | on_re |
| feren | efere | efere | n_ref | feren | efere | feren | efere | feren |
| ce#ca | nce#c | nce#c | erenc | ce#ct | nce#c | ce#cs | nce#c | ce#cr |
| cos " | cos " | tan " | e#cat | anh " | log " | qrt " | onj " | eal " |
| wikil | wikil | wikil | anh " | wikil | wikil | wikil | wikil | wikil |
| ink") | ink") | ink") | wikil | ink") | ink") | ink") | ink") | ink") |
| -     | -     | -   [ | ink") | -     | -     | -     | -     |       |
| [`cac |   [`c | `caco | -     | [`cta |    [` | [`csq |   [`c |       |
| osl`] | cosf` | sh`]( |    [` | nhf`] | cabs` | rtl`] | onjf` |       |
| (../c | ](../ | ../co | catan | (../c | ](../ | (../c | ](../ |       |
| omple | compl | mplex | hl`]( | omple | compl | omple | compl |       |
| x.h/F | ex.h/ | .h/Fu | ../co | x.h/F | ex.h/ | x.h/F | ex.h/ |       |
| uncti | Funct | nctio | mplex | uncti | Funct | uncti | Funct |       |
| on_re | ion_r | n_ref | .h/Fu | on_re | ion_r | on_re | ion_r |       |
| feren | efere | erenc | nctio | feren | efere | feren | efere |       |
| ce#ca | nce#c | e#cac | n_ref | ce#ct | nce#c | ce#cs | nce#c |       |
| cos " | cos " | osh " | erenc | anh " | abs " | qrt " | onj " |       |
| wikil | wikil | wikil | e#cat | wikil | wikil | wikil | wikil |       |
| ink") | ink") | ink") | anh " | ink") | ink") | ink") | ink") |       |
| -     | -     | -     | wikil | -     | -     | -     | -     |       |
|  [`ca |   [`c |    [` | ink") | [`cta |   [`c |    [` |   [`c |       |
| sin`] | cosl` | cacos | -     | nhl`] | absf` | carg` | onjl` |       |
| (../c | ](../ | hf`]( |  `cc | (../c |  | ink") | wikil | osh " | ink") | ink") | ink") | ink") |       |
| -     | -     | ink") | wikil | -     | -     | -     | -     |       |
| [`cas |    [` | -     | ink") |    [` |   [`c |   [`c |  [`cp |       |
| inf`] | csin` |    [` | -     | cexp` | absl` | argf` | roj`] |       |
| (../c | ](../ | cacos | `cco |  | ink") | osh " | osh " | ink") | ink") | ink") | ink") |       |
| -     | -     | wikil | wikil | -     | -     | -     | -     |       |
| [`cas |   [`c | ink") | ink") |   [`c |    [` |   [`c | [`cpr |       |
| inl`] | sinf` | -   [ | -     | expf` | cpow` | argl` | ojf`] |       |
| (../c | ](../ | `casi | `cco |  | ink") | inh " | osh " | ink") | ink") | ink") | ink") |       |
| -     | -     | wikil | wikil | -     | -     | -     | -     |       |
|  [`ca |   [`c | ink") | ink") |   [`c |   [`c |  [`ci | [`cpr |       |
| tan`] | sinl` | -     | -     | expl` | powf` | mag`] | ojl`] |       |
| (../c | ](../ |    ` |  [`cs |  | ink") | e#cas | inh " | ink") | ink") | ink") | ink") |       |
| -     | -     | inh " | wikil | -     | -     | -     | -     |       |
| [`cat |    [` | wikil | ink") |    [` |   [`c | [`cim |  [`cr |       |
| anf`] | ctan` | ink") | -     | clog` | powl` | agf`] | eal`] |       |
| (../c | ](../ | -     | `csi |  | ink") | erenc | inh " | ink") | ink") | ink") | ink") |       |
|       |       | e#cas | wikil |       |       |       |       |       |
|       |       | inh " | ink") |       |       |       |       |       |
|       |       | wikil |       |       |       |       |       |       |
|       |       | ink") |       |       |       |       |       |       |
+-------+-------+-------+-------+-------+-------+-------+-------+-------+

### ctype.h

+----------------+----------------+----------------+----------------+
| -   `         | -   [`         | -   [`         | -   [`         |
| isalnum` | it "wikilink") | ct "wikilink") | er "wikilink") |
| -   `         | -   [`         | -   [`         | -   [`         |
| isalpha` | ph "wikilink") | ce "wikilink") | er "wikilink") |
| -   `         | -   [`         | -   [`         |                |
| isblank` | er "wikilink") | er "wikilink") |                |
| -   `         | -   [`         | -   [`is       |                |
| iscntrl` | nt "wikilink") | it "wikilink") |                |
+----------------+----------------+----------------+----------------+

### fenv.h

+----------------------+----------------------+----------------------+
| -   `f              | -   [`               | -                    |
| eclearexcept` | setround "wikilink") |
| arexcept "wikilink") | -   `fe             | -   [`               |
| -   [`fegetenv` | stexcept "wikilink") |
| fegetenv "wikilink") | -   `fesetenv` | pdateenv "wikilink") |
| ceptflag "wikilink") | -   `fesete         |                      |
| -                    | xceptflag` |                      |
| getround "wikilink") |                      |                      |
+----------------------+----------------------+----------------------+

### inttypes.h

+----------------------------------+----------------------------------+
| -   `imaxabs` | inttypes.h/wcstoimax "wikilink") |
| -   `imaxdiv` | inttypes.h/wcstoumax "wikilink") |
| -   `strtoimax` |                                  |
| -   `strtoumax` |                                  |
+----------------------------------+----------------------------------+

### locale.h

+------------------------------------------------------------------+
| -   `localeconv` |
| -   `setlocale`   |
+------------------------------------------------------------------+

### math.h

+----------------------+----------------------+----------------------+
| -                    | -   `isinf`         | -   [`isnan`         |
|   [`fpclassify` | .h/isnan "wikilink") |
| classify "wikilink") | -   [`isless`]       | -   `isnormal` | isnormal "wikilink") |
| isfinite "wikilink") | -                    | -                    |
| -   `isgreater` | essequal "wikilink") | nordered "wikilink") |
| -   `isgr           | -   `is             | -   [`signbit` |
| terequal "wikilink") | sgreater "wikilink") |                      |
+----------------------+----------------------+----------------------+

### setjmp.h

+------------------------------------------------------------+
| -   `longjmp` |
| -   `setjmp`   |
+------------------------------------------------------------+

### signal.h

+--------------------------------------------------------+
| -   `raise` |
+--------------------------------------------------------+

### stdarg.h

+--------------------------------------------------------------+
| -   `va_arg`     |
| -   `va_copy`   |
| -   `va_end`     |
| -   `va_start` |
+--------------------------------------------------------------+

### stdatomic.h

+----------------------+----------------------+----------------------+
| -   `ato            | -   [`atomic_exch    | -   [`atomic_fl      |
| mic_init` | exchange "wikilink") | c.h/atomic_flag_test |
| -                   | -   [`atomic_ex      | _and_set "wikilink") |
| `atomic_thread_fence | change_explicit` | explicit "wikilink") | ng/stdatomic.h/atomi |
| -                   | -   [`a              | c_flag_test_and_set_ |
| `atomic_signal_fence | tomic_compare_exchan | explicit "wikilink") |
| ` | omic_compare_exchang | ar` | tdatomic.h/atomic_fl |
| `atomic_is_lock_free | -                   | ag_clear "wikilink") |
| ` | ` |                      |
| ic_store "wikilink") | -                    |                      |
| -   [`ato            |  [`atomic_compare_ex |                      |
| mic_store_explicit`] | change_weak`](C_Prog |                      |
| (C_Programming/stdat | ramming/stdatomic.h/ |                      |
| omic.h/atomic_store_ | atomic_compare_excha |                      |
| explicit "wikilink") | nge_weak "wikilink") |                      |
| -   `ato            | -                    |                      |
| mic_load` | it`](C_Programming/s |                      |
| -   `a              | tdatomic.h/atomic_co |                      |
| tomic_load_explicit` | mpare_exchange_weak_ |                      |
|  |                      |
| tomic.h/atomic_load_ | -   `atomi          |                      |
| explicit "wikilink") | c_fetch` |                      |
|                      | -   `atomic_fetc    |                      |
|                      | h_key_explicit` |                      |
+----------------------+----------------------+----------------------+

### stddef.h

+----------------------------------------------------------------------+
| -   `offse                                                          |
| tof` |
+----------------------------------------------------------------------+

### stdio.h

+----------------+----------------+----------------+----------------+
| -   `cl       | -              | -   `gets` | _reference#sca |
| rr "wikilink") | ad "wikilink") | -              | nf "wikilink") |
| -              | -              | `perror` | reference#setb |
| se "wikilink") | nf "wikilink") | -              | uf "wikilink") |
| -   `feof` | _reference#fse | tf "wikilink") | eference#setvb |
| -              | ek "wikilink") | -   `putc` |
|   `fgetc` | o.h/Function_r |
| tc "wikilink") | eference#fsetp | -   `         | eference#sprin |
| -   [`         | os "wikilink") | putchar` |
| fgetpos` | _reference#fte | -   `puts` | _Programming/s | le "wikilink") |
|   `fgets` | rogramming/std |
| _reference#fge | .h/Function_re | -              | io.h/Function_ |
| ts "wikilink") | ference#fwprin | `remove` | rogramming/std | tc "wikilink") |
|   `fopen` | gramming/stdio |
| _reference#fop | io.h/Function_ | -              | .h/Function_re |
| en "wikilink") | reference#fwri | `rename` | rogramming/std | tf "wikilink") |
| fprintf`](C_Pr | -   `getc` | ogramming/stdi |
| eference#fprin | n_reference#ge | -              | o.h/Function_r |
| tf "wikilink") | tc "wikilink") | `rewind` |
|   `fputs` | rogramming/std |
| _reference#fpu | eference#getch |                | io.h/Function_ |
| ts "wikilink") | ar "wikilink") |                | reference#wsca |
|                |                |                | nf "wikilink") |
+----------------+----------------+----------------+----------------+

### stdlib.h

+----------+----------+----------+----------+----------+----------+
| -        | -   `a  | -       | -   [`ge | -        | -        |
|    [`abo | tof` | tion_ref | ion_refe |
| erence#a | atof "wi | #div "wi | -        | erence#q | rence#st |
| bort "wi | kilink") | kilink") |  `mallo | sort "wi | rtol "wi |
| kilink") | -   [`a  | -   [`   | c` | kilink") |
| -       | toi` | kilink") | toul "wi |
| #abs "wi | kilink") | kilink") | -        | -   `   | kilink") |
| kilink") | -        | -   [`e  |  [`callo | srand` | .h/Funct |
| nction_r | kilink") | ference# | rence#ma | -        | ion_refe |
| eference | -       | exit "wi | lloc "wi |  [`strto | rence#sy |
| #abs "wi | `bsearch | kilink") | kilink") | d` | ` |
| -        | gramming | [`free`] | `reallo | g/stdlib |          |
|  [`atexi | /stdlib. | (C_Progr | c` | ion_refe | kilink") |          |
| ion_refe | kilink") |          | rence#ma |          |          |
| rence#at |          |          | lloc "wi |          |          |
| exit "wi |          |          | kilink") |          |          |
| kilink") |          |          |          |          |          |
+----------+----------+----------+----------+----------+----------+

### string.h

+----------+----------+----------+----------+----------+----------+
| -   `me | -        | -        | -        | -        | -        |
| mchr` | ion_refe | ion_refe | ion_refe | pbrk "wi | ion_refe |
| -   `me | rence#me | rence#st | rence#st | kilink") | rence#st |
| mcmp` | kilink") | kilink") | `strrchr | kilink") |
| ming/str | -        | -        | -       | ` | ogrammin | ogrammin | gramming | h/Functi | gramming |
| -   `me | g/string | g/string | /string. | on_refer | /string. |
| mcpy` | ence#str |
| ing.h/me | rcat "wi | rcmp "wi | cspn "wi | -        | xfrm "wi |
| mcpy "wi | kilink") | kilink") | kilink") |  `strsp | kilink") |
| kilink") | -        | -        | -   [`s  | n` | nce#stre | kilink") |          |
| kilink") | rcat "wi | -        | rror "wi | -        |          |
|          | kilink") |  `strcp | kilink") |  [`strst |          |
|          | -        | y` | rence#st | kilink") |          |
|          | rchr "wi |          | rlen "wi |          |          |
|          | kilink") |          | kilink") |          |          |
+----------+----------+----------+----------+----------+----------+

### threads.h

+----------------+----------------+----------------+----------------+
| -   `c        | -   [          | -   [`thr      | -              |
| all_once` | it "wikilink") | al "wikilink") | et "wikilink") |
| -              | -             | -   [`t        |                |
|    [`cnd_broad | `mtx_lock` | it "wikilink") |                |
| st "wikilink") | -              | -   `t        |                |
| -   [`cnd_d    |    [`mtx_timed | hrd_join` |                |
| oy "wikilink") | ck "wikilink") | -   `thr      |                |
| -   [          | -   [`mtx_t    | d_sleep` |                |
| it "wikilink") | ck "wikilink") | -   `thr      |                |
| -   [`cnd      | -   [`mtx      | d_yield` |                |
| al "wikilink") | ck "wikilink") | -   `tss      |                |
| -              | -   [`thrd_    | _create` |                |
| .h/cnd_timedwa | te "wikilink") | -   `tss      |                |
| it "wikilink") | -   [`thrd_cu  | _delete` |                |
| reads.h/cnd_wa | nt "wikilink") | -              |                |
| it "wikilink") | -   `thrd_    |  [`tss_get` |                |
| ds.h/mtx_destr | ch "wikilink") |                |                |
| oy "wikilink") |                |                |                |
+----------------+----------------+----------------+----------------+

### time.h

+----------------------+----------------------+----------------------+
| -   [`asctime`]      | -   `gmtime`        | -   [`time           |
| (C_Programming/time. |  |
| #asctime "wikilink") | e#gmtime "wikilink") |                      |
| -   `clock          | -   [`localtime` | ocaltime "wikilink") |                      |
| -   `ctime          | -   [`mktime`        |                      |
| ` | e#mktime "wikilink") |                      |
| -   `difftime` |                      |
| difftime "wikilink") |                      |                      |
+----------------------+----------------------+----------------------+

### uchar.h

+-------------------------------------------------------------+
| -   `mbrtoc16` |
| -   `c16rtomb` |
| -   `mbrtoc32` |
| -   `c32rtomb` |
+-------------------------------------------------------------+

### wchar.h

+---------+---------+---------+---------+---------+---------+---------+
| -       | -       | -       | -       | -       | -   `  | -       |
| [`btowc |  [`getw |    [`sw | [`wcscm |    [`wc | wcstol` |    [`wm |
| ` | ar "wik | nf "wik | referen | py "wik | ilink") | et "wik |
| -   `  | ilink") | ilink") | ce#wcsc | ilink") | -       | ilink") |
| fgetwc` | -       | -       | mp "wik | -       |    [`wc | -       |
|  |    [`wc | stoul`] |    `wp |
| grammin | n` | nction_ | h/unget | ramming | h/wcspb | ul "wik | h/wprin |
| -       | referen | wc "wik | /wchar. | rk "wik | ilink") | tf "wik |
| `fgetw | ce#mbrl | ilink") | h/wcsco | ilink") | -       | ilink") |
| s` | `vfwpri | ilink") |    [`wc | sxfrm`] | wscanf` |
| ing/wch | -   `  | ntf` | ilink") |
| ilink") | ction_r | ilink") | nction_ | ilink") | -       |         |
| -   `  | eferenc | -   [   | referen | -   [   | [`wctob |         |
| fputwc` | e#mbrto | `vswpri | ce#wcsc | `wcsrto | ` | _Progra | ilink") | _Progra | ng/wcha |         |
| g/wchar | -       | mming/w | -       | mming/w | r.h/wct |         |
| .h/fput |    [`mb | char.h/ |    [`wc | char.h/ | ob "wik |         |
| wc "wik | sinit`] | vswprin | scspn`] | wcsrtom | ilink") |         |
| ilink") | (C_Prog | tf "wik | (C_Prog | bs "wik | -       |         |
| -       | ramming | ilink") | ramming | ilink") |    [`wm |         |
| [`fwide | /wchar. | -       | /wchar. | -   [`  | emchr`] |         |
| `](C_Pr | h/mbsin |  `vwpr | h/wcscs | wcsspn` | (C_Prog |         |
| ogrammi | it "wik | intf` | C_Progr | ilink") | grammin | /wchar. |         |
| r.h/fwi | -      | amming/ | -       | g/wchar | h/wmemc |         |
| de "wik | `mbsrto | wchar.h |  [`wcsf | .h/wcss | hr "wik |         |
| ilink") | wcs` |         |
| -       | _Progra | tf "wik | C_Progr | ilink") | -       |         |
|  `fwpr | mming/w | ilink") | amming/ | -   [`  |    [`wm |         |
| intf` | (C_Prog | ilink") | g/wchar | /wchar. |         |
| /fwprin | -       | ramming | -   `  | .h/wcss | h/wmemc |         |
| tf "wik |   [`put | /wchar. | wcslen` | tr "wik | mp "wik |         |
| ilink") | wc` | ilink") |         |
| -       | Program | mb "wik | grammin | -   [`  | -       |         |
|    [`fw | ming/wc | ilink") | g/wchar | wcstod` |    [`wm |         |
| scanf`] | har.h/F | -       | .h/wcsl | ](C_Pro | emcpy`] |         |
| (C_Prog | unction | `wcsca | en "wik | grammin | (C_Prog |         |
| ramming | _refere | t` | g/wchar | ramming |         |
| /wchar. | nce#put | rogramm | -       | .h/wcst | /wchar. |         |
| h/fwsca | wc "wik | ing/wch |    [`wc | od "wik | h/wmemc |         |
| nf "wik | ilink") | ar.h/Fu | sncat`] | ilink") | py "wik |         |
| ilink") | -       | nction_ | (C_Prog | -   `  | ilink") |         |
| -       |  `putw | referen | ramming | wcstok` | -       |         |
| [`getwc | char` | at "wik | g/wchar | C_Progr |         |
| ng/wcha | wchar.h | -   `  | ilink") | .h/wcst | amming/ |         |
| r.h/get | /putwch | wcschr` | -   [   | ok "wik | wchar.h |         |
| wc "wik | ar "wik |  | /wmemmo |         |
| ilink") | ilink") | grammin | p` |         |
|         |    `sw | .h/wcsc | ing/wch |         |         |         |
|         | printf` | hr "wik | ar.h/Fu |         |         |         |
|         |  | nction_ |         |         |         |
|         | grammin |         | referen |         |         |         |
|         | g/wchar |         | ce#wcsc |         |         |         |
|         | .h/Func |         | mp "wik |         |         |         |
|         | tion_re |         | ilink") |         |         |         |
|         | ference |         |         |         |         |         |
|         | #swprin |         |         |         |         |         |
|         | tf "wik |         |         |         |         |         |
|         | ilink") |         |         |         |         |         |
+---------+---------+---------+---------+---------+---------+---------+

### wctype.h

+-------------+-------------+-------------+-------------+-------------+
| -   [       | -   [       | -   [       | -   [`t     | -           |
| `iswalnum`] | `iswdigit`] | `iswpunct`] | owctrans`]( |    `wctype |
| (C_Programm | (C_Programm | (C_Programm | C_Programmi | ` | "wikilink") | "wikilink") | "wikilink") | "wikilink") |
| -   [       | -   [       | -   [       | -   [       |             |
| `iswalpha`] | `iswgraph`] | `iswspace`] | `towlower`] |             |
| (C_Programm | (C_Programm | (C_Programm | (C_Programm |             |
| ing/string. | ing/string. | ing/string. | ing/string. |             |
| h/iswalpha  | h/iswgraph  | h/iswspace  | h/towlower  |             |
| "wikilink") | "wikilink") | "wikilink") | "wikilink") |             |
| -   [       | -   [       | -   [       | -   [       |             |
| `iswcntrl`] | `iswlower`] | `iswupper`] | `towupper`] |             |
| (C_Programm | (C_Programm | (C_Programm | (C_Programm |             |
| ing/string. | ing/string. | ing/string. | ing/string. |             |
| h/iswcntrl  | h/iswlower  | h/iswupper  | h/towupper  |             |
| "wikilink") | "wikilink") | "wikilink") | "wikilink") |             |
| -   [       | -   [       | -   [`i     | -           |             |
| `iswctype`] | `iswprint`] | swxdigit`]( |  `wctrans` |             |
| (C_Programm | (C_Programm | C_Programmi |  | "wikilink") | "wikilink") | "wikilink") |             |
+-------------+-------------+-------------+-------------+-------------+


# C Programming/Preprocessor reference

## Preprocessor Reference

The following preprocessor statements exist:

`Statement Subsequent items on the control line Meaning`\
`========= ==================================== =======`\
`#if       conditional-expression               conditional`\
`#ifdef    identifier                           true iff identifier is a macro`\
`#ifndef   identifier                           true iff identifier is not a macro`\
`#elif     conditional-expression               continues a conditional`\
`#else                                          continues a conditional`\
`#endif                                         ends a conditional`\
`#include  header-name                          includes a file`\
`#define   identifier                           defines a macro`\
`#undef    identifier                           removes a previously defined macro`\
`#line     number filename                      changes the line number and file name`\
`#error    token-list                           specifies an error`\
`#pragma   token-list                           catchall`

Some nonstandard compilers also specify `#warning` and `#import`.

A *conditional-expression* above can include the defined operator.

The `#define ``<i>`{=html}`identifier``</i>`{=html} above can be
followed by an optional list of parameters and then an optional list of
replacement tokens. The left parenthesis of the parameter list must have
no preceding white space.


# C Programming/POSIX Reference

The **C POSIX library** is a language-independent library (using C
calling conventions) that adds functions specific to POSIX systems.
POSIX (and the Single Unix Specification) specifies a number of routines
that should be available over and above those in the C standard library
proper. It was developed at the same time as the ANSI C standard and is
closely related to C. Some effort was made to make the C and POSIX
libraries compatible, but there are a few POSIX functions that were
never introduced into ANSI C.

Facilities are often implemented alongside the C standard library
functionality, with varying degrees of closeness. For example, glibc
implements functions such as fork within libc.so, but before NPTL was
merged into glibc it constituted a separate library with its own linker
flag. Often, this POSIX-specified functionality will be regarded as part
of the library; the C library proper may be identified as the ANSI or
ISO C library.

## Header files

  -------------------- -------------------------------------------------------------------
  **aio.h**            Asynchronous input and output.
  **arpa/inet.h**      Definitions for internet operations.
  **cpio.h**           Magic numbers for the cpio archive format.
  **dirent.h**         Allows the opening and listing of directories.
  **fcntl.h**          File opening, locking and other operations.
  **fmtmsg.h**         Message display structures.
  **fnmatch.h**        Filename-matching types.
  **ftw.h**            File tree traversal.
  **glob.h**           Pathname pattern-matching types.
  **grp.h**            User group information and control.
  **iconv.h**          Codeset conversion facility.
  **langinfo.h**       Language information constants.
  **libgen.h**         Definitions for pattern matching functions.
  **monetary.h**       Monetary types.
  **mqueue.h**         Message queues (REALTIME).
  **ndbm.h**           Definitions for ndbm database operations.
  **net/if.h**         Sockets local interfaces.
  **netdb.h**          Definitions for network database operations.
  **netinet/in.h**     Internet address family.
  **netinet/tcp.h**    Definitions for the Internet Transmission Control Protocol (TCP).
  **nl_types.h**       Data types.
  **poll.h**           Definitions for the poll() function.
  **pthread.h**        Defines an API for creating and manipulating POSIX threads.
  **pwd.h**            Passwd (user information) access and control.
  **regex.h**          Regular expression matching types.
  **sched.h**          Execution scheduling.
  **search.h**         Search tables.
  **semaphore.h**      Semaphores.
  **spawn.h**          Create a new process to run an executable program.
  **strings.h**        String operations.
  **stropts.h**        STREAMS interface (STREAMS).
  **sys/ipc.h**        Inter-process communication (IPC).
  **sys/mman.h**       POSIX memory management declarations.
  **sys/msg.h**        POSIX message queues.
  **sys/resource.h**   Definitions for XSI resource operations.
  **sys/select.h**     Select types.
  **sys/sem.h**        POSIX semaphores.
  **sys/shm.h**        XSI shared memory facility.
  **sys/socket.h**     Main sockets header.
  **sys/stat.h**       File information (stat et al.).
  **sys/statvfs.h**    VFS File System information structure.
  **sys/time.h**       Time and date functions and structures.
  **sys/times.h**      File access and modification times structure.
  **sys/types.h**      Various data types used elsewhere.
  **sys/uio.h**        Definitions for vector I/O operations.
  **sys/un.h**         Definitions for UNIX domain sockets.
  **sys/utsname.h**    uname and related structures.
  **sys/wait.h**       Status of terminated child processes.
  **syslog.h**         Definitions for system error logging.
  **tar.h**            Magic numbers for the tar archive format.
  **termios.h**        Allows terminal I/O interfaces.
  **trace.h**          Tracing.
  **ulimit.h**         ulimit commands.
  **unistd.h**         Various essential POSIX functions and constants.
  **utime.h**          File access and modification times.
  **utmpx.h**          User accounting database definitions.
  **wordexp.h**        Word-expansion types.
  -------------------- -------------------------------------------------------------------

## Standard overlap headers

Headers that overlap/extend the C standard.

  ---------------- ------------------------------------------------------
  **assert.h**     Verify program assertion.
  **complex.h**    Complex arithmetic.
  **ctype.h**      Character types.
  **fenv.h**       Floating-point environment.
  **float.h**      Floating types.
  **inttypes.h**   Fixed size integer types.
  **iso646.h**     Alternative spellings.
  **limits.h**     Implementation-defined constants.
  **locale.h**     Category macros.
  **math.h**       Mathematical declarations.
  **setjmp.h**     Stack environment declarations.
  **signal.h**     Signals.
  **stdarg.h**     Handle variable argument list.
  **stdbool.h**    Boolean type and values.
  **stddef.h**     Standard type definitions.
  **stdint.h**     Integer types.
  **stdio.h**      Standard buffered input/output.
  **stdlib.h**     Standard library definitions.
  **string.h**     String operations.
  **tgmath.h**     Type-generic macros.
  **time.h**       Time types.
  **wchar.h**      Wide-character handling.
  **wctype.h**     Wide-character classification and mapping utilities.
  ---------------- ------------------------------------------------------

## References

-   Official List of headers in the POSIX library on
    opengroup.org
-   Lists headers in the POSIX
    library
-   Description of the posix library from the Flux
    OSKit

## Bibliography

-


# C Programming/GNU C Library Reference

## Header files

  ---------------------------------------- ----------------------------------------------------
  `argp.h`           Interface for parsing unix-style argument vectors.
  `argz.h`           Allocate/grow argz vectors.
  `envz.h`
  `execinfo.h`   Backtrace support.
  `libintl.h`
  ---------------------------------------- ----------------------------------------------------

## Table of functions

### argp.h

+----------------------------------+----------------------------------+
| -   `argp_error`                | -   `argp_state_help` | gp.h/argp_state_help "wikilink") |
| -   `argp_failure` |  |
| -   `argp_help                  |                                  |
| ` |                                  |
| -   `argp_parse`                |                                  |
|  |                                  |
+----------------------------------+----------------------------------+

### argz.h

+----------------------+----------------------+----------------------+
| -                   | -   [`argz_          | -   [`argz_          |
| `argz_add` | z_create "wikilink") | z_insert "wikilink") |
| -   `argz_ad        | -   [`argz_create_s  | -   [`a              |
| d_sep` | eate_sep "wikilink") | rgz_next "wikilink") |
| -   `argz_          | -   [`argz_          | -   [`argz_re        |
| append` | z_delete "wikilink") | _replace "wikilink") |
| -   `arg            | -   [`argz_ex        | -   [`argz_string    |
| z_count` | _extract "wikilink") | tringify "wikilink") |
+----------------------+----------------------+----------------------+

### envz.h

+----------------------------------+----------------------------------+
| -   [`envz_ad                    | -   [`envz_remove`]              |
| d`](/envz.h/envz_add "wikilink") | (/envz.h/envz_remove "wikilink") |
| -   `envz_entry`                | -   `envz_strip`                |
|  |  |
| -   `envz_ge                    |                                  |
| t` |                                  |
| -   `envz_merge`                |                                  |
|  |                                  |
+----------------------------------+----------------------------------+

### execinfo.h

+----------------------------------------------------------------------+
| -   `backtrace`                  |
| -   `backtrace_symbols`  |
| -                                                                   |
| `backtrace_symbols_fd` |
+----------------------------------------------------------------------+

### libintl.h

+----------------------+----------------------+----------------------+
| -   `bind_textdom   | -   [`dg             | -   [`textdo         |
| ain_codeset` | xtdomain "wikilink") |
| _codeset "wikilink") | -   `dnge           |                      |
| -   [`bindtextdomain | ttext` |                      |
| xtdomain "wikilink") | -   `               |                      |
| -   [`dcge           | gettext` |                      |
| cgettext "wikilink") | -   `ng             |                      |
| -   [`dcnget         | ettext` |                      |
| ngettext "wikilink") |                      |                      |
+----------------------+----------------------+----------------------+

## Standard Library Extensions

Platform facilities that extend the standard library headers.

### assert.h

+-------------------------------------------------------------+
| -   `assert_perror` |
+-------------------------------------------------------------+

### complex.h

+----------------------------------+----------------------------------+
| -   [`clog10`]                   | -   `clog10l` | ../complex.h/clog10l "wikilink") |
| -   `clog10f` |                                  |
| -   `clog10fN` |                                  |
| -   `clog10fNx` |                                  |
+----------------------------------+----------------------------------+

### fenv.h

+---------------------------------------------------------------+
| -   `fedisableexcept` |
| -   `feenableexcept`   |
| -   `fegetexcept`         |
+---------------------------------------------------------------+

### math.h

+----------------------+----------------------+----------------------+
| -   `j0fN` |    `pow10` |
| -                    | .h/pow10 "wikilink") | -                    |
|    `j0fNx` |  `pow10f` |
| -   `j1fN` | -   `y1fN` | -                    | h.h/y1fN "wikilink") |
| -                    |  `pow10l` |    `y1fNx` | -                    | .h/y1fNx "wikilink") |
| -   `jnfN` | h/sincos "wikilink") | h.h/ynfN "wikilink") |
| -                    | -                   | -                    |
|    `jnfNx` | /sincosf "wikilink") | .h/ynfNx "wikilink") |
| -   `lgamm          | -   [`s              |                      |
| afN_r` | sincosfN "wikilink") |                      |
| -   `lgammaf        | -   [`sin            |                      |
| Nx_r` | incosfNx "wikilink") |                      |
|                      | -                   |                      |
|                      | `sincosl` |                      |
+----------------------+----------------------+----------------------+

### signal.h

+---------------------------------------------------------+
| -   `sysv_signal` |
+---------------------------------------------------------+

### stdio.h

+----------------------+----------------------+----------------------+
| -   `as             | -   [`fputs_unlocked | -   [`               |
| printf` | unlocked "wikilink") | /getline "wikilink") |
| -   `               | -   [`fread_unlocked | -   [`obstack_printf |
| clearerr_unlocked` | k_printf "wikilink") |
| unlocked "wikilink") | -                    | -                    |
| -   `feof_unlocke   |   [`fwrite_unlocked` |   [`obstack_vprintf` |
| d` | unlocked "wikilink") | _vprintf "wikilink") |
| -                    | -   `ge             | -   [`open_memstream |
|   [`ferror_unlocked` | tdelim` | emstream "wikilink") |
| unlocked "wikilink") | -   `fputs_unlocked | -   [`sn             |
| -   [`fgets_unlocked | ` | snprintf "wikilink") |
| unlocked "wikilink") | -   `fread_unlocked | -   [`tm             |
| -                    | ` | tmpnam_r "wikilink") |
|  |   `fwrite_unlocked` | rintf` |
| emopen` | -   `vsnp           |
| fmemopen "wikilink") | -   `ge             | rintf` |
| kie` |                      |
| encookie "wikilink") |                      |                      |
+----------------------+----------------------+----------------------+

### stdlib.h

+----------------+----------------+----------------+----------------+
| -              | -   `jra      | -              | -   [`sra      |
|  [`alloca` | _r "wikilink") | vt "wikilink") | _r "wikilink") |
| -   `c        | -   [`lco      | -   [          | -   [`sra      |
| anonicalize_fi | ng48_r` | _r "wikilink") | _r "wikilink") |
| calize_file_na | -   `lra      | -              |                |
| me "wikilink") | nd48_r` | vt "wikilink") |                |
| tdlib.h/cleare | -   `mra      | -   [`r        |                |
| nv "wikilink") | nd48_r` | _r "wikilink") |                |
| dlib.h/drand48 | -   `nra      | -   [          |                |
| _r "wikilink") | nd48_r` | ch "wikilink") |                |
| /stdlib.h/ecvt | -   `pts      | -              |                |
| _r "wikilink") | name_r` | .h/secure_gete |                |
| dlib.h/erand48 | -              | nv "wikilink") |                |
| _r "wikilink") |    `qecvt` | tdlib.h/seed48 |                |
| ./stdlib.h/get | -             | _r "wikilink") |                |
| pt "wikilink") | `qecvt_r` | lib.h/setstate |                |
| ib.h/initstate |                | _r "wikilink") |                |
| _r "wikilink") |                |                |                |
+----------------+----------------+----------------+----------------+


# C Programming/MS Windows Reference

## Header files

  -------------------------------------- ----------------------------
  `alloc.h`       Dynamic memory allocation.
  `conio.h`       Text user interfaces.
  `process.h`   Threads and processes.
  -------------------------------------- ----------------------------

## Table of functions

### alloc.h

+--------------------------------------------------+
| -   `farmalloc` |
+--------------------------------------------------+

### conio.h

+--------------------------------------------+
| -   `getch`   |
| -   `getche` |
| -   `gotoxy` |
| -   `clrscr` |
+--------------------------------------------+

### process.h


# C Programming/C Compilers Reference List

For a brief introduction to setting up and using some of the more
beginner-friendly compilers and IDEs, see ../Using a
Compiler/.

## Free (or with a free version)

-   Ch_interpreter
    (http://www.softintegration.com) - The software works in Windows,
    Linux, Mac OS X, Freebsd, Solaris, AIX and HP-UX. The Ch Standard
    Edition is free for noncommercial use.
-   Interactive C
    (http://www.botball.org/educational-resources/ic.php).
    -   target platform: Handy Board (Freescale 68HC11); Lego RCX
-   CINT is an interpreter for C and C++ code,
    included in the data-analysis package ROOT. The
    CINT interpreter is licensed under the X11/MIT license. (
    <https://root.cern.ch/drupal/content/cint> ).
-   PicoC is a very small C
    interpreter, intended for small embedded systems with very little
    code space or data space.
    -   PicoC target platform: x86-32, x86-64, powerpc, arm, ultrasparc,
        HP-PA and blackfin processors; and is easy to port to new
        targets.
-   Extensible Interactive C
    (EiC)
-   lcc-win32
    (http://www.cs.virginia.edu/\~lcc-win32) - Software copyrighted by
    Jacob Navia. It is free for non-commercial use. Windows
    (98/ME/XP/2000/NT).
-   GNU Compiler Collection
    (http://gcc.gnu.org) - GNU Compiler Collection. GNU General Public
    License / GNU Lesser General Public License.
    -   MinGW (http://www.mingw.org/) provides GCC
        for Windows
-   clang (LLVM) (http://clang.llvm.org/) - Almost
    everywhere
-   Open Watcom (http://www.openwatcom.org)
    Open Source development community to maintain and enhance the Watcom
    C/C++ and Fortran cross compilers and tools. Version 1.4 released in
    December 2005.
    -   **Host Platforms:** Win32 systems (IDE and command line), 32-bit
        OS/2 (IDE and command line), DOS (command line), and Windows 3.x
        (IDE)
    -   **Target Platforms:** DOS (16-bit), Windows 3.x (16-bit), OS/2
        1.x (16-bit), Extended DOS, Win32s, Windows 95/98/Me, Windows
        NT/2000/XP, 32-bit OS/2, and Novell NLMs
    -   **Experimental / Development:** Linux, BSD, \*nix, PowerPC,
        Alpha AXP, MIPS, and Sparc v8
-   Tiny C Compiler
    (http://www.tinycc.org) - A small C compiler designed to work for
    slow computers with little disk space (e.g. on rescue disks).
-   Portable C Compiler
    (http://pcc.ludd.ltu.se) - Portable C Compiler. BSD Style
    License(s).
-   Small Device C Compiler
    (SDCC)
    -   target platforms: Intel 8051-compatibles; Freescale (Motorola)
        HC08; Microchip PIC16 and PIC18.
-   FpgaC. Target platform: FPGA hardware via XNF
    or VHDL files.
-   C compilers for many digital signal processors (DSPs), many of them
    are free, and are listed in the comp.dsp
    FAQ.
-   Microsoft Visual C++
    (http://msdn.microsoft.com/visualc) - Free (partially limited)
    version available (Express\|Community Edition)

## Paid

-   Intel C Compiler
    (http://software.intel.com/en-us/intel-compilers) - Windows, Linux,
    Mac, QNX, and embedded C/C++ compilers. Optimized for Intel 32-bit
    and 64-bit CPUs.
-   Impulse C - Target platform: FPGA hardware
    via Hardware Description Language (HDL) files.


# C Programming/Index

This is an alphabetical index of the book.

## A

-   `argv` - poorly treated
    -   ../Pointers and
        arrays/#sizeof
-   ../Arrays/
-   Assignment
    -   ../Variables/#Declaring, Initializing, and Assigning
        Variables
    -   ../Simple math/#Assignment
        operators
-   `auto`

## B

-   Boolean
    -   ../Control#Conditionals
-   `break`

## C

-   `calloc`
-   `case`
-   Cast operators
-   `char`
    -   ../Variables/#The char
        type
-   Comments
-   Comparison
-   ../Compiling/
-   `const`
-   `continue`
-   Conditionals
-   Control structures

## D

-   Data types
    -   ../Variables/
    -   ../Complex types/
-   `default`
-   `do`
-   `#define`
-   `double`
    -   ../Variables/#The double
        type

## E

-   `else`
-   `#else` "wikilink")
-   `#elif` "wikilink")
-   `#endif` "wikilink")
-   `#error`
-   `extern`

## F

-   Files
-   `float`
    -   ../Variables/#The float
        type
-   `for`
-   `free`
-   Functions
-   Variadic
    functions

## G

-   `goto`

## I

-   `if`
-   `#if` "wikilink")
-   `#ifdef`
-   `#ifndef`
-   `#include`
-   Input and output
    -   ../Simple input and
        output/
    -   ../File IO/
-   `int`
    -   ../Variables/#The int
        type

## L

-   Logical operators
    -   ../Simple math/#Logical
        operators
    -   ../Control#Logical
        Expressions
-   `long`
    -   ../Variables/#Data type
        modifiers
-   Loops

## M

-   Macros
-   `main` - poorly treated
    -   ../Pointers and
        arrays/#sizeof
-   `malloc`
-   Math
    -   ../Simple math/ - addition,
        subtraction, multiplication, division, and modulus
    -   ../Further math/ - functions from
        `math.h` library
-   ../Memory management/
-   Multidimensional arrays
    -   ../Common practices/#Dynamic multidimensional
        arrays

## O

-   Operator
    -   ../Simple math/
    -   ../Reference Tables/#Table of
        Operators

## P

-   `#pragma`
-   ../Preprocessor/
-   `printf`
    -   ../Simple input and output/#Output using
        printf() "wikilink")
    -   ../C
        Reference/stdio.h/printf/
    -   ../Procedures and
        functions/printf/
-   Pointers
    -   ../Pointers and arrays/
    -   ../Complex
        types/#Pointers
-   Procedures

## R

-   `ralloc`
-   `register`
-   `return`

## S

-   `short`
    -   ../Variables/#Data type
        modifiers
-   `signed`
    -   ../Variables/#Data type
        modifiers
-   `sizeof`
-   Standard libraries
    -   ../Standard libraries/
    -   ../Procedures and functions/#Functions from the C Standard
        Library
    -   ../C Reference/assert.h/
    -   ../C
        Reference/complex.h/
    -   ../C Reference/ctype.h/
    -   ../C Reference/errno.h/
    -   ../C Reference/fenv.h/
    -   ../C Reference/float.h/
    -   ../C
        Reference/inttypes.h/
    -   ../C Reference/iso646.h/
    -   ../C Reference/limits.h/
    -   ../C Reference/locale.h/
    -   ../C Reference/math.h/
    -   ../C Reference/setjmp.h/
    -   ../C Reference/signal.h/
    -   ../C Reference/stdarg.h/
    -   ../C
        Reference/stdbool.h/
    -   ../C Reference/stddef.h/
    -   ../C Reference/stdint.h/
    -   ../C Reference/stdio.h/
    -   ../C Reference/stdlib.h/
    -   ../C Reference/string.h/
    -   ../C Reference/tgmath.h/
    -   ../C Reference/time.h/
    -   ../C Reference/wchar.h/
    -   ../C Reference/wctype.h/
-   `static`
-   Static
    functions
-   ../Strings/
-   `struct`
-   Subprograms
-   `switch`

## T

-   `typedef` - seems poorly treated

## U

-   `#undef`
-   `union`
-   `unsigned`
    -   ../Variables/#Data type
        modifiers

## V

-   Variable-length argument
    lists
-   Variadic
    functions
-   `volatile`

## W

-   `while`

## Variables

-   ../Variables/


# C Programming/Links

Links to online resources relating to learning how to program in C:

-   *The C Book*, second
    edition by Mike Banahan, Declan Brady and Mark Doran, originally
    published by Addison Wesley in 1991. This version is made freely
    available.

-   Programming in C: A
    Tutorial, by Brian W.
    Kernighan; 9600 words

-   The GNU C Reference
    Manual \-- a reference
    for the C programming language, as implemented by the GNU C Compiler

-   The GNU C Library \-- a
    manual for the GNU C library, which defines all of the library
    functions specified by the ISO C standard, and other functions

-   Wikipedia:C syntax - cca 9700
    words, as of March 2012

-   Wikipedia:C (programming
    language) "wikilink")

-
Printed books and materials:

-
fr:Programmation
C/Bibliographie


# Wikijunior:Biology/Introduction

## Introduction

**Biology** is the study of life. It helps us understand many things,
such as how our body works, how our body keeps warm, and what we are
made of. Biology is very important to know. Some things we can learn
about in biology are *genetics* (the study of human traits), *zoology*
(the study of animals), *botany* (the study of plants), and *ecology*
(the study of relationships between all living things).

Someone who studies biology is called a *biologist*.

Image:Human female metaphase chromosomes.tif\|thumb\|genetics
Image:Begegnung-01.jpg\|thumb\|zoology Image: Pachycereus pringlei
forest.jpg \|thumb\|botany
Image:Sunrise_over_Veterans_Park_2420.jpg\|thumb\|ecology

## What is life?

Living things are different from things that are not alive. It is
usually easy to tell what is living and what is not, but it is sometimes
hard to tell, like with very small organisms.

Here are some properties of living things. You might notice that some
non-living things can also have some of these properties.

-   **Living things can change and grow.** However, volcanoes can also
    change and grow when they erupt.
-   **Living things can move.** However, the wind is moving air, and
    water always moves downhill.
    -   Just like animals, even plants can move. They can grow, and
        sometimes move more rapidly than that, in response to things
        such as the sun or water. One example is that sunflowers will
        naturally turn during the course of the day so that they are
        always facing the sun. Similarly, another example is that if a
        plant gets tipped over, it will want to turn upwards to face the
        sun.
-   **Living things can reproduce,** which means that they can produce
    copies of themselves, over and over. This is the most important
    difference between living and non-living things.
    -   In order to reproduce, living things need nutrition, which are
        nutrients and energy sources in order to assemble the materials
        needed to reproduce themselves. In this process, living things
        must excrete waste. Waste is material which is of no use to
        living things, or in some cases, material that can be harmful.

Animals, bacteria, and plants are examples of living things. Rivers,
mountains, oceans, and soil are examples of non-living things, but they
are often homes for living things.

Cars and tables are also not living things, because they cannot
reproduce themselves.

Image:The_freshwater_alga_Spirogyra.jpg\|thumb\|Freshwater Alga
Image:Viburnum_opulus_fruits_close-up\_-\_Keila.jpg\|thumb\|Berry
Image:Anax imperator 2015 11 23 6807.jpg\|thumb\|Dragon-fly
Image:Uitrollend blad van een Polystichum setiferum. 19-04-2023. (d.j.b)
01.jpg\|thumb\|Fern Image:Hellenic pond turtle (Emys orbicularis
hellenica) Butrint.jpg\|thumb\|Turtle Image:Iceland Poppy Papaver
nudicaule \'Champagne Bubbles\' Orange Center.jpg\|thumb\|Bloom

## Levels of life

Living things can be of many different sizes. Size is very important in
biology, since biologists organize the structures and groupings of
living creatures according to size. A living creature is called an
organism. Organisms can consist of single cells or multiple different
types of cells grouped into tissues and organs.

From smallest to largest, these are how living things are grouped:

Cells
:   Most cells are only a few microns wide, and are so small that they
    can only be seen with a microscope. A micron is one thousandth of a
    millimeter.

Tissues
:   Tissues are groups of similar cells that are all doing similar
    things, like a muscle, which pulls things together.

Organs
:   Organs are made of lots of tissues. They all have a special
    function, like the heart, which pumps blood.

Organ systems
:   Organ systems are groups of organs which work together to do
    something. For example, all the organs which digest your food make
    up the digestive system.

Organisms
:   An organism is a whole living thing, like you, or a tree.

Populations
:   A population is a group of organisms which are all the same species
    and live together.

Communities
:   A community is a group of populations of different species, which
    live together; for example, all the fish in a lake.

Ecosystems
:   All the communities of organisms in an area, and the way they
    interact with non-living things like rivers or the weather in that
    area, form an ecosystem.

Biomes
:   A biome is a large region of Earth that has a certain climate and
    certain types of living things. Major biomes include tundra,
    forests, grasslands, and deserts.

Biosphere
:   The biosphere is the whole network of living things on planet Earth
    --- eight thousand miles in diameter, twenty five thousand miles
    around the equator.

Everything in this list is made up of the things above it. For example,
communities are made of many populations and populations are made up of
many organisms.

  ----------------------------------------------------------------------------------------------
   ! {width="400"}
                            The earth, our home, our biotope in space.
  ----------------------------------------------------------------------------------------------


# Wikijunior:Biology/Creatures

## Creatures

Many different creatures live on earth: plants, insects, birds, fish,
bacteria, humans and many more. They have many differences and
similarities.

<File:Monkey> of kembang island.jpg\|thumb\|Monkey <File:Pterois>
volitans Manado-e edit.jpg\|thumb\|Pterois volitans <File:Marabou> Stork
at Animal Kingdom Lodge.jpg\|thumb\|Marabou Stork <File:Jelly>
Monterey.jpg\|thumb\|Jelly Monterey <File:Common> carder
bee.jpg\|thumb\|Common carder bee
<File:Euglena.gracilis.jpg%7Cthumb%7CEuglena>

## Are living beings related to each other?

*According to the theory of evolution, all living beings on earth are
related to each other.*

We humans are therefore related to monkeys, cows and apple trees, but
also to mosquitoes and bacteria. All living organisms on earth today
share common ancestors.

## Tree of life

<File:Tree> of life by Haeckel.jpg\|thumb\|Tree of life by Haeckel
<File:Circular> timetree-of-life 2009.jpg\|thumb\|ohne\|Circular
timetree-of-life 2009

In 1879, the biologist **Ernst Haeckel** drew a family tree of living
things inspired by the family trees of noble families. At the roots are
the unicellular organisms, from which all higher living beings descend,
with humans at the top. Scientists are aware that scientific statements
can be wrong and therefore look for errors. They found errors in
Haeckel\'s picture. So, the birds are drawn in the wrong place.

Modern family trees are much more complex. Humans are now on a par with
other living organisms. On the left of the picture are the mammals, next
to them are the birds. One of the lines denotes the humans. Extinct
creatures such as dinosaurs are not shown here. Even the modern family
trees are probably wrong. Viruses can transfer genes between different
organisms and protozoa can exchange genes with other protozoa. There are
many unanswered questions, especially in the case of unicellular
organisms. There is still much to explore for future biologists.


# Wikijunior:Biology/Science and theory of evolution

## Science and theory of evolution

The aim of science is to understand the world better (knowledge) and to
produce new technology (innovation). Scientists develop mental models
(theories) and functional models (such as an engine). Then they test
these models through thought and experimentation. Appropriate models are
presented to the public. Scientists change these models and test them
again. *For scientists, models are not the truth.* They are therefore
always looking for improvements. Good theories are understandable and
thoroughly tested.

<File:Cucurbita_maxima_02_-_Orange.jpg%7CCucurbita> maxima
<File:Cucurbita_pepo_accidental_hybrid_Acchini.jpg%7CCucurbita> pepo
Acchini <File:2006-10-18Cucurbita_pepo02.jpg%7CCucurbita> pepo
File:Cucurbita_pepo\_\'Ufo\'\_-\_scallop_group_Weißer_Kürbis\_\"Ufo\".jpg\|Cucurbita
pepo \'Ufo\' <File:Assorted> Cucurbita pepo and maxima
gourds.jpg\|thumb\|Assorted Cucurbita pepo <File:Cucurbita> in Bayern -
Kürbis - Sortenvielfalt.jpg\|thumb\|Cucurbita from Bayern

## Development of the theory of evolution

For centuries, scientists have repeatedly suspected that today\'s
creatures had common ancestors. They knew that breeders of crops and
livestock can change the characteristics of living beings. So, the
pumpkin growers used only the seeds of the best pumpkins for the next
seed. In some regions, growers propagated red gourds, in other regions
green ones. This is how different shapes came about. However, the
scientists could not explain how breeding without a breeder could work.
!Charles Darwin **Charles
natural selection is possible without a breeder. For example, if the
food is encased in a thick shell, a bird must be able to crack it to
survive. A thick beak makes this possible. The problems in the habitat
of living beings determines the goals. A narrow-pointed beak helps to
capture insects. He realized this through observations on a trip to the
Galapagos Islands.

<File:Evolution_sm.png> <File:Darwin's_finches.png%7CDarwin's> finches
<File:Darwin's_Finches,_Denver_Museum_of_Nature_and_Science.jpg>

## Evolution as natural selection

!DNA double helix
horizontal
The genes are located in the cells of living beings. The genes contain
the building and operating instructions of the living being. These are
made up of DNA.

-   **Mutation**\
    DNA can be altered by naturally occurring radioactive radiation.
    This leads to changes in the offspring. As a result, children, such
    as Darwin finch chicks, have different characteristics. They are
    called variations.

```{=html}
<!-- -->
```
-   **Selection**\
    Some chicks die, others survive. Creatures that are better adapted
    to the environment have a better chance of surviving. Chicks with a
    feeding beak are more likely to survive.

```{=html}
<!-- -->
```
-   **Propagation**\
    The survivors can have children.

## Evolution as a scientific process

!Chick before the first
flight
Evolution and scientific work are based on a comparable process:

-   **Mutation**\
    Science: Scientists modify existing models.\
    Evolution: Radiation changes DNA.

```{=html}
<!-- -->
```
-   **Selection**\
    Science: Scientists test the models in experiments.\
    Evolution: The realities of nature are a severe test for all living
    beings.

```{=html}
<!-- -->
```
-   **Propagation**\
    Science: Through a publication, other scientists learn about the
    model.\
    Evolution: Living beings have children.

The theory of evolution describes a scientific knowledge and innovation

## Direction and destination

A breeder strives for goals, the evolutionary process of nature does
not. But the mechanism of evolution has one direction: best possible
adaptation to the environment in order to survive. For example, being
able to fly is very useful. Many innovations were needed before the
physical and mental abilities were available for birds to fly and find
their way back home after a migration.

## Science and truth

In philosophy, there have been arguments about truth for centuries.
Since each side was convinced that they had the (absolute) truth at
their disposal, an agreement was impossible. Science has solved the
problem: on the one hand, science dispenses with absolute statements.
All statements are preliminary and can always be improved. On the other
hand, scientists have developed methods to check the quality of models.
Scientific statements are not true or untrue, but of high or low
quality. That doesn\'t mean scientists aren\'t confident in their
theories. However, good scientists are generally willing to revise their

## Is the theory of evolution a good theory?

-   The theory of evolution is understandable. It is clear that
    well-adapted creatures are more likely to survive.

```{=html}
<!-- -->
```
-   The theory of evolution is logical. It is based on the laws of
    mathematics (statistics).

```{=html}
<!-- -->
```
-   The theory of evolution is often tested. It has been verified by
    computer simulations, experiments and observations in nature.

```{=html}
<!-- -->
```
-   The theory of evolution is helpful. It explains many properties of
    living things and processes in nature that would otherwise be
    incomprehensible.

The theory of evolution is a high-quality theory.

In particular, questions of speciation, the Cambrian Explosion and the
origin of life are currently under discussion.

## References

[^1]:

[^2]:

[^3]:


# Wikijunior:Biology/Life

## Definition of Life

Scientists have come up with over a hundred different definitions of the
term \"life\". Many definitions are similar. They usually belong to one

## Definitions

-   **Enumeration of properties**\
    *Life is a system that has a metabolism, can grow, multiply and move

Definitions should help to avoid misunderstandings when working
together. Scientists have therefore developed quality criteria for
definitions.

With enumerations, a problem arises with classification if not all
criteria are met. Enumerated definitions are of low quality.

Metabolism wip.png\|thumb\|Metabolism Cross-section of an Oak Log
Showing Growth Rings.jpg\|thumb\|Growth Rings Sonchus April
2010-1.jpg\|Seeds Christie (racing automobile)
LCCN2014682300.jpg\|thumb\|Racing Automobile Darwin Hybrid Tulip
Mutation 2014-05-01.jpg\|Tulip with Mutation

-   **Matter and Energy**\
    *Life is a system of nucleic acids and polymerases that absorbs and

The definition is limited. It relates to earthly life.

Some scientists suspect that there are life forms in space that use
other substances.

RNA Polymerase II.png\|thumb\|RNA Polymerase

-   **Information**\
    *Life is a system that can absorb, process and deliver information

The definition is wide. It does not separate biology from technology.\

Papertape3.jpg\|thumb\|Information

-   **Themodynamics**\
    *Life is an unstable system that creates and maintains order within

This definition applies to other aspects of life: Living beings try to
maintain order so they don\'t die.

That\'s true, but definitions are meant to be intuitive.\

Mischentropie.jpg\|thumb\|Entropie

The definitions listed distinguish between animate and inanimate.

In the following symbiosis-based definition, there is a graded
transition. Organisms are a higher life form than unicellular organisms
because they rely on more symbioses.

-   **Scientifically - philosophically**\
    *Life is based on symbioses, ie on cooperation for mutual benefit.
    Philosophical: Life is based on the principle of love.*

Principle-based definitions are of higher quality than adhock
definitions.

This is a principle-based definition: symbioses form the basis of life.
But biologists have different opinions on this question.

The symbiosis definition gives life an (ethical) value, which is
important for doctors and lawyers. But many biologists strictly reject
the use of philosophical terms like \"love\".\

Common clownfish curves dnsmpl.jpg\|thumb\|Clownfish with Sea anemone
African buffalo (Syncerus caffer caffer) male with cattle
egret.jpg\|thumb\|African buffalo with cattle egret Hummingbird hawkmoth
a.jpg\|thumb\|Hummingbird with Plant
PloverCrocodileSymbiosis.jpg\|thumb\|Crocodile with Plover Lasius niger
y Cinara tujafilina en Thuja orientalis.jpg\|thumb\|Ant with Aphid
Lichen Cladonia portentosa and Hypogymnia physodes.jpg\|thumb\|Lichen:
Mushroom with Algae

Life is diverse. Each of these definitions illuminates different aspects
of life.

`== Literature ==`

[^1]:

[^2]:

[^3]:

[^4]:

[^5]:

[^6]:


# Wikijunior:Biology/Origin of Life

## Origin of Life

!Stromatolite about 3.4 billion years
old
after the formation of the earth, there were protozoa and stromatolite.
It is not known how life evolved. There are various theories, one of
which is presented below. Living things control their internal
chemistry. A main problem in the transition from chemistry to biology is
self-regulation. A comparison with the market economy should clarify
this.

\- When the warehouses in a factory are full, production is stopped.
(End products inhibit chemical reactions.) In a market economy,
production is regulated by supply and demand. (In chemistry, starting
products and end products control the reaction.)

\- There is a problem with waste products in the industry. These must be
disposed of. This reduces the profit. Many entrepreneurs have become
rich because they came up with an idea of how to make something valuable
out of the waste products. The waste product became the raw material.
(The end product of one chemical reaction can become the starting
product of another reaction.)

**\* Step 1: Cycle** Starting products and catalysts promote chemical
reactions. After the reaction, the catalysts are released and are
available for further reactions. That\'s why it\'s called a cycle. End
products inhibit chemical reactions.

The end product of a chemical reaction becomes the starting product in
another reaction. This restarts the production of this substance.

**Both cycles control and sustain each other in a symbiosis.**

The metabolic processes of every cell are based on a large number of
hypercycles. According to the symbiosis-based definition, hypercycles
are very simple life forms based on chemistry, single-celled organisms
with their enormous number of hypercycles are a significantly higher
life form.

Living things need a boundary to hold their parts together. It is
possible that the first living beings arose in small cavities in the
rock between which chemical substances circulated. It was only much
later that individual cells left the cavities and settled elsewhere. The
first form of life was therefore not a single cell, but a habitat. The
first biological form of life was therefore the biotope.

400px \|MUexperiment

Living beings need to constantly take in food. This consists of
chemicals and provide building material and energy. In order for life to
arise, the necessary chemical substances such as sugar, fats and amino
acids had to be available. Scientists have shown that for all important
substances there are a number of ways in which they could have formed.
therefore believe that there are living beings on many planets and moons
in space.

## Speciation

All living things live in a shared **environment**. They need to use
certain things (called **resources**) from their environment, like food,
water, and a place to live. These resources are limited, so when more
than one organism tries to use the same resource, they end up in
**competition**. When two living things compete for a common resource,
one of them will eventually win and **consume** (or use) that resource.
When something about a thing\'s body makes it better at competing for
resources, we call that special feature **adaptation**. Since these
adaptations can be passed from parents onto their children, as time goes
on, these adaptations become more common within a **population**, or
group of similar living things living together. This is called **Natural
Selection**, or **Evolution**.

When a small group of living things (a small population) gets separated
from the main population that they came from (like if they move over a
mountain range or a river, or if they move to a new island so that they
can\'t easily move back) they will often find themselves in a different
environment than they were in before. This new environment has different
resources and different competitors, so the new population will need
different features or adaptations to be a strong competitor than what
they had needed before. The original population hasn\'t changed at all,
they still need the same adaptations as before. Over time, as the new
population begins to adapt to their new environment, they start to look
less and less like the other population. Eventually, after thousands or
even millions of years, the two populations will look so different that
they can\'t be called the same species. We call this process
**speciation**, which just means the formation of new species.
Speciation is an unavoidable consequence and a very important part of
evolution.

The Earth itself was born *4 and a half billion years ago*. At first, it
was just a bunch of rock and water. There were no living things. But
then, about *3.8 billion years ago*, the first life was formed in the
oceans. It was no bigger than a single cell, but that single cell was
able to copy itself and form more and more cells. Over billions of
years, as that one cell evolved, it became more and more complex.
Eventually, about *1 billion years ago*, the first living things with
more than one cell were born. Many of the kinds of things that lived
that long ago can\'t be found living in the world any more, because
newer things have been better competitors and forced the older things to
**extinction**, but we know they existed because we can find their
**fossils**, which are traces of ancient living things buried deep in
the rocks.

## Literature

[^1]:

[^2]: Eigen & Schuster (1977) The Hypercycle. A Principle of Natural
    Self-Organisation. Part A: Emergence of the
    Hypercycle.
    Naturwissenschaften Vol. 64, pp. 541--565.

[^3]:

[^4]:


# Wikijunior:Biology/Cells

## Cells

!Plant cells

All living things are made of cells. They are the components and
building blocks of life.

**What is a cell?** *A cell is a bag of liquid that holds in the stuff
of life.*

A cell is the smallest structural and functional unit of a living
organism. The word \"cell\" comes from the Latin word *cella*, which
means small room. If you look at living things under a microscope, you
will see that they are made of small squares or balls. **Robert Hooke**,
a biologist from England, saw these small squares in a hard material
called cork using a microscope in the year 1665. They looked like rooms,
and so he called them cells. He was also the first person to observe
dead cells.

**What types of cells are there?** There are two kinds of cells:
**eukaryotes**, which have a large ball in them called a *nucleus*, and
**prokaryotes**, which do not.

Most prokaryotes are very small. Two of the six kingdoms, *Bacteria* and
*Archea*, are made up of prokaryotes. All of the rest of the kingdoms --
*Animalia*, *Plantae*, *Fungi*, and *Protista* -- are made up of
eukaryotes.

### Endosymbiosis Theory

Every human being is a living being. But each one is made up of a large
number of tiny living things called cells. But that\'s not all! Smaller
creatures live in every cell of our body. The larger cell nourishes the
smaller cells inside, and the small cells perform important functions.

Working together for mutual benefit is called symbiosis. According to
the endosymbiont theory, single-celled organisms were taken up by the
large cells long ago. The mitochondria are derived from aerobic
bacteria. The mitochondria gain energy from food and oxygen. The
chloroplasts found in plant cells are derived from cyanobacteria. The
chloroplasts gain energy from light.

<File:Euglena> mutabilis - 400x - 1 (10388739803).jpg\|thumb\|Euglena
<File:Euglena> viridis TK-UT.svg\|thumb\|Euglena
<File:Endosymbiosis.svg%7Cthumb%7CEndosymbiosis> <File:Serial>
Endosymbiosis Theory.png\|thumb\|Endosymbiosis Theory

## What do cells look like?

Cells are surrounded by a thin layer of oil called the *cell membrane*.
It separates the inside of the cell from the outside. Some cells also
have a firm box around them called a *cell wall* that keeps it from
breaking. The water that fills a cell is called the *cytoplasm*. Inside
a cell, knowledge is stored in something called a *chromosome*. It tells
the cell how to work, like steps in a book.

Eukaryotic cells hold their chromosomes in a structure called a
**nucleus**, which has its own oily membrane around it. Cells also have
many other things with membranes called **organelles**, which means
\"little organs\". Some organelles found in eukaryotic cells are called
*ribosomes*, *vacuoles*, *mitochondria*, and *chloroplasts*. !Human
sperm
cell{width="600"}

Cells that do different things have different shapes. A plant leaf cell
takes light and uses it to make sugar. To do this, it has green
organelles called *chloroplasts*. To get the most light, it pushes
cytoplasm in circles around a hollow bubble of water in the center of
the cell called a *vacuole*.

A human sperm cell carries its chromosomes, found in the nucleus, to an
egg cell in order to make a new baby. It has a large tail called a
*flagella* that helps it to swim. It also has many organelles called
*mitochondria* that give it power, like how gasoline powers a car.

#### Vocabulary words

:   **nucleus** - A ball of membrane in the middle of the cell that
    holds the chromosomes.
:   **chromosomes** - Things that hold the knowledge of the cell.
:   **prokaryote** - A cell without a nucleus.
:   **eukaryote** - A cell with a nucleus.
:   **organelles** - Little things inside a cell.
:   **cytoplasm** - The gel-like inside of a cell.
:   **membrane** - An oil bag that holds water.
:   **vacuole** - An organelle full of water and waste inside a cell.
:   **mitochondria** - An organelle that makes power in a cell.
:   **chloroplast** - An organelle that makes sugar found in a plant or
    protist.
:   **flagella** - A tail on a cell that makes it swim.
:   **Golgi body** - An organelle which helps in secretion.
:   **ribosome** - An organelle which helps in synthesis of proteins.


# Wikijunior:Biology/Tissues

! Animal muscle
tissue

## Tissues

Organisms are made of tissues. Tissues are groups of
cells that work together. Plant leaves
have tissues that capture light and make sugar. Most animals have
**muscle** tissues that help them move.

When two or more tissues work together to do one thing, they make up
organs.

In plants, there are two types of tissues:

-   **Meristematic tissue**: This has actively dividing cells.
-   **Permanent tissue**: This type of tissue has developed cells. They
    do not divide.

There are also two different types of permanent tissue:

-   **Simple permanent tissue**: This type of permanent tissue has only
    one kind of cells. Some examples of simple permanent tissues are:
    -   **Parenchyma**: They have loosely packed cells. The cells do not
        have a particular function.
    -   **Collenchyma**: They have cells which have layers called
        pectin. They contain chlorophyll.
    -   **Sclerenchyma**: They have dead cells. Between the cells, there
        are layers called lignin.
-   **Complex permanent tissue**: This type of permanent tissue contains
    different kinds of cells. Some examples of complex permanent tissues
    are:
    -   **Xylem**: This type of tissue contains mainly dead cells. They
        help to move water from the roots to leaves.
    -   **Phloem**: This type of tissue contains mainly living cells.
        They help moving food materials from leaves to other parts.


# Wikijunior:Biology/Organs

## Organs

! A heart\|thumb Many living things have
**organs**. Your heart, brain, lungs, liver, and kidneys are all
examples of organs.

Organs are made up of two or more
tissues.

All organs have something that they do to keep you healthy. For example,
the heart pumps blood, and the lungs give you air.

Organs work together in groups called organ
systems.

## Cambrian explosion and organ formation

The earth formed about 4.5 billion years ago. One billion years later,
at the latest, there will be unicellular organisms. Complex
single-celled organisms, called eukaryotes, arose until about 2 billion
years ago. The first multicellular organisms, such as filamentous algae,
jellyfish and worms, arose 1-2 billion years ago. Around 540 million
years ago, animals with complex organs such as hearts and eyes emerged.
Just as the economy and way of life of people fundamentally changed in
the industrial revolution in a short historical time, all animal tribes
that exist today have developed in a geologically short time. Biologists
speak of the Cambrian explosion. The industrial was triggered by basic
innovations such as the steam engine. The Cambrian explosion was also
probably triggered by basic innovations that made organ formation
possible. The prerequisite is that cells specialize and then migrate to
the right place.

<File:Medusina> asteroides.jpg <File:Life> in the Ediacaran sea.jpg
<File:DickinsoniaCostata.jpg> <File:20191020> Yohoia tenuis.png
<File:Opabinia> smithsonian.JPG <File:Figure> 27 04 03.jpg


# Wikijunior:Biology/Systems

`__NOTOC__`

## Organ systems

!A diagram of the reproductive system in
women{width="250"}
Two or more organs that work together make up an **organ system**.

Organ systems are found in all different kinds of living things.

Some of the organ systems found in humans include:

-   Circulatory
    system
-   Respiratory
    system
-   Digestive system
-   Endocrine system
-   Reproductive
    system
-   Urinary system
-   Immune system
-   Muscular system
-   Skeletal system
-   Integumentary
    system
-   Nervous system


# Wikijunior:Biology/Kingdoms

## Kingdoms

When we look at living things we divide them up into groups and give the
groups names. This is called **classification**.

Living things are classified into groups of different sizes. The biggest
groups contain almost everything. The smallest groups have only a few
types of living things in them.

The groups are, from large to small:

:   Domain
:   Kingdom
:   Phylum
:   Class
:   Order
:   Family
:   Genus
:   Species

The domains are *Bacteria*, *Archaea*, and *Eukarya*, but most people
still find it easiest to divide things by **kingdom**.

The five kingdoms are:

:   Archaea
:   Bacteria
:   Animalia (Animals)
:   Plantae (Plants)
:   Fungi (Funguses and
    mushrooms)


# Wikijunior:Biology/Viruses

## Viruses

!A virus called a rotavirus, which can cause diarrhea.\|alt=Diarrhoea
causing virus,
Rotavirus.
Viruses are much smaller than other living things like
bacteria, so small that it
would take around one hundred viruses laid end to end just to make the
length of a bacterium! Viruses are not really alive. They fall in the
line between living things and non-living things. They do not do all of
the things that living things
do. They can only
make more copies of themselves when they are inside living cells.

Viruses often kill cells, and also make
you ill. Lots of diseases are caused by viruses, the most famous ones
are the viruses that cause the flu, colds, and Covid-19.


# MySQL/Introduction

## What is SQL?

For a more general introduction see the SQL Wikibook.

**S**tructured **Q**uery **L**anguage is a third generation language for
working with relational databases. Being a 3G language it is closer to
human language than machine language and therefore easier to understand
and work with.

-   Dr. E. F. Ted Codd who worked for IBM described a relational model
    for database in 1970.
-   In 1992, ANSI (American National Standards Institute), the apex
    body, standardized most of the basic syntax.
-   Its called SQL 92 and most databases (like Oracle, MySQL, Sybase,
    etc.) implement a subset of the standard (and proprietary extensions
    that makes them often incompatible).

## Why MySQL?

-   Free as in Freedom - Released with GPL version 2 license (though a
    different license can be bought from Oracle, see below)
-   Cost - Free!
-   Support - Online tutorials, forums, mailing list (lists.mysql.com),
    paid support contracts.
-   Speed - One of the fastest databases available.
    (1)
-   Functionality - supports most of ANSI SQL commands.
-   Ease of use - less need of training / retraining.
-   Portability - easily import / export from Excel and other databases
-   Scalable - Useful for both small as well as large databases
    containing billions of records and terabytes of data in hundreds of
    thousands of tables.
-   Permission Control - selectively grant or revoke permissions to
    users.

### The MySQL license

MySQL is available under a *dual-licensing* scheme:

1.  Under the GNU General Public License, version 2, (\"or later\"
    allowed in versions released before 2007): this is a Free (as in
    freedom), copyleft software license that allows you to use MySQL for
    commercial and non-commercial purposes in your application, as long
    as your application is released under the GNU GPL. There is also a
    \"FLOSS Exception\"
    which essentially allows non-GPL\'d but Free applications (such as
    the PHP programming language, under the PHP license) to connect to a
    MySQL server. The exception lists a set of free and open-source
    software license that can be used in addition to the GNU GPL for
    your MySQL-dependent Free application.
2.  A so-called \"commercial\" [^1], paid license, that is, a license
    where MySQL grants you the right to integrate MySQL with a non-FLOSS
    application that you are redistributing outside your own
    organization. [^2]

## MySQL and its forks

MySQL is Free Software, so some forks and unofficial builds delivering
contributions from the community exist.

### MariaDB

In 2008 Sun Microsystems bought MySQL, Sun being itself later acquired
by Oracle, in 2010. After the acquisition, the development process has
changed. The team has started to release new MySQL versions less
frequently, so the new code is less tested.There were also less
contributions from the community.

In 2009 Monty Widenius, the founder of MySQL, left the company and
created a new one, called The Monty Program.
He started a new fork called MariaDB. The scopes of MariaDB,

-   import all the new code that will be added to the main MySQL branch,
    but enhancing it to make it more stable;
-   clean the MySQL code;
-   add contributions from the community (new plugins, new features);
-   develop the Aria storage engine, formerly named Maria;
-   improving the performance;
-   adding new features to the server.

The license is the GNU GPLv2 (inherited from MySQL).

The primary platform for MariaDB is GNU/Linux, but also works on one
proprietary system. The following Storage Engine have been added:

-   Aria (also used for internal tables)
-   PBXT
-   XtraDB
-   FederatedX
-   SphinxSE
-   OQGRAPH
-   Others may be added in the future.

### Drizzle

In 2008 Brian Aker, chief architect of MySQL, left the project to start
a new fork called Drizzle. While Oracle
initially funded the project, Drizzle is now funded by Rackspace. Its
characteristics are:

-   only a small part of the MySQL code has survived in this fork, the
    rest being removed: only essential features are implemented in the
    Drizzle server;
-   the survived code has been cleaned;
-   Drizzle is modular: many features are or can be implemented as
    plugins;
-   the software is optimized for multiCPU and multicore 64 bit
    machines;
-   only GNU/Linux and UNIX systems are supported.

There are no public releases of this fork, still. Its main license will
be the GNU GPLv2 (inherited from MySQL), but where possible the BSD
license is applied.

### OurDelta

OurDelta is another fork, maintained by Open
Query. The first branch, which has number 5.0, is based on MySQL 5.0.
The 5.1 branch is based on MariaDB. OurDelta includes some patches
developed by the community or by third parties. OurDelta provides
packages for some GNU/Linux distributions: Debian, Ubuntu, Red
Hat/CentOS. It is not available for other systems, but the source code
is freely available.

### Percona Server

Percona Server is a MySQL fork maintained by Percona. It provides the
ExtraDB Storage Engine, which is a fork of InnoDB, and some patches
which mainly improve the performance.

## Notes

```{=html}
<references />
```
fr:MySQL/Introduction

[^1]: Calling it \"commercial\" is misleading, because the GNU GPL can
    be used in commercial (but non-proprietary) projects.

[^2]: Proprietary projects still can connect to a MySQL server without
    purchasing this license by using old versions of the MySQL client
    connection libraries (under the GNU Lesser General Public License).
    However, these libraries cannot connect to the newest versions of
    the MySQL server.