char Data Type

The char data type represents a single character from the Unicode character set. A character is not the same as a string.

CrossRef.eps For information about strings, see String Data Type.

To assign a value to a char variable, you use a character literal, which consists of a single character enclosed in apostrophes (not quotes). Here’s an example:

char code = ‘X’;

Here, the character X is assigned to the variable named code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset