Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Char: Difference between revisions

From Coderwiki
new
 
reference Collection in 'making up a string' section
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The <code>char</code> (or '''character''') [[data type]] generally stores a single character, represented by a certain [[character encoding]].
The <code>char</code> (or '''character''') [[data type]] generally stores a single character, represented by a certain [[character set]].


== Size of a char ==
== Size of a char ==
Line 8: Line 8:


== Making up a [[string]] ==
== Making up a [[string]] ==
When multiple <code>char</code> values are collected in an [[array]] or [[list]], they form a ''sequence of characters'' known as a [[string]].
When multiple <code>char</code> values are collected in an [[array]] or [[list]] (or other [[collection]]), they form a ''sequence of characters'' known as a [[string]].

Latest revision as of 07:52, 13 August 2025

The char (or character) data type generally stores a single character, represented by a certain character set.

Size of a char

edit edit source

Chars are usually between 8 bits, but in some languages, are larger:

When multiple char values are collected in an array or list (or other collection), they form a sequence of characters known as a string.