This shows you the differences between two versions of the page.
c:datatypes:char [2013/01/22 22:02] |
c:datatypes:char [2024/02/16 01:05] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{keywords>wiki library source code example reference}} | ||
+ | ===== char ===== | ||
+ | char | ||
+ | Character value or small integer | ||
+ | 1byte | ||
+ | signed: -128 to 127 | ||
+ | unsigned: 0 to 255 | ||
+ | |||
+ | You can use to find it out ;) | ||
+ | ===== C Sourcecode Example ===== | ||
+ | <code c> | ||
+ | #include <stdio.h> /* including standard library */ | ||
+ | //#include <windows.h> /* uncomment this for Windows */ | ||
+ | |||
+ | |||
+ | int main(void) | ||
+ | { | ||
+ | printf("char: %d bytes\n", sizeof(char) ); | ||
+ | return 0; | ||
+ | } | ||
+ | </code> |