| int, char | Keywords

Keyword Index

Basic data types (integer and character).

Variables of type int are one machine-type word in length. They can be signed (default) or unsigned, which means that in this configuration of the compiler they have by default a range of -32768 to 32767 and 0 to 65535 respectively, but this default may be changed if the compiler option '-mnoshort' is given. In this case, the range of type int is -2147483648 to 2147483647 for signed case, or 0 to 4294967295 for unsigned case. See also short and long type modifiers.
Variables of type char are 1 byte in length. They can be signed (this is the default, unless you use the compiler option '-funsigned-char') or unsigned, which means they have a range of -128 to 127 and 0 to 255, respectively.
All data types may be used for defining variables, specifying return types of functions, and specifying types of function arguments. For example,

    int a, b, c;                       // 'a', 'b', 'c' are integer variables
    int func ();                       // 'func' is a function returning int
    char crypt (int key, char value);  // 'crypt' is a function returning char with
                                       // two args: 'key' is int and 'value' is char

When function return type is omitted, `int` is assumed.
All data type keywords may be used in combination with asterisks, brackets and parentheses, for making complex data types, like pointer types, array types, function types, or combinations of them, which in the C language may have an arbitrary level of complexity (see asterisk for more info).