Language | Libraries | Comparison

char

Description

A data type that takes up 1 byte of memory that stores a character value. Character literals are written in single quotes, like this: 'A' (for multiple characters - strings - use double quotes: "ABC"). You can do arithmetic on characters, in which the ASCII value of the character is used (e.g. 'A' + 1 has the value 66, since the ASCII value of the capital letter A is 65).

Example

    char sign = ' ';

Parameters

    char var = 'x';

  • var - your char variable name
  • x - the value (single character) you assign to that variable... ie: a, 4, #, etc.

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.