See also type system overview and arithmetic types defined by the language.
[edit] Basic types [edit] Additional basic types and convenience macros unsigned integer type returned by the sizeof operatorbool
(C99)(removed in C23)
convenience macro, expands to _Booltrue
(C99)(removed in C23)
expands to integer constant 1false
(C99)(removed in C23)
expands to integer constant â0â__bool_true_false_are_defined
(C99)(deprecated in C23)
expands to integer constant 1alignas
(C11)(removed in C23)
convenience macro, expands to keyword _Alignasalignof
(C11)(removed in C23)
convenience macro, expands to keyword _Alignof__alignas_is_defined
(C11)(removed in C23)
expands to integer constant 1__alignof_is_defined
(C11)(removed in C23)
expands to integer constant 1noreturn
(C11)(deprecated in C23)
convenience macro, expands to _NoreturnThe type of true and false is int rather than _Bool.
A program may undefine and perhaps then redefine the macros bool, true and false. However, such ability is a deprecated feature.
(since C99)The type of true and false is bool. It is unspecified whether any of bool, _Bool, true, or false is implemented as a predefined macro.
If bool, true, or false (but not _Bool) is defined as a predefined macro, a program may undefine and perhaps redefine it.
(since C23) [edit] Example#include <stdalign.h> #include <stdbool.h> #include <stdio.h> int main(void) { printf("%d %d %d\n", true && false, true || false, !false); printf("%d %d\n", true ^ true, true + true); printf("%zu\n", alignof(short)); }
Possible output:
[edit] ReferencesRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4