Working notebook: a commonplace blog for collecting notes & exploring ideas.
Home. Site Map. Subscribe. More at expLog.
Useful references / articles on C; organized by date of collection not origin.
#include <stdlib.h>
#include <stdio.h>
int main(int argc, [[maybe_unused]] char* argv[argc+1]) {
return EXIT_SUCCESS;
}
EXIT_SUCCESS
comes from stdlib
[[maybe_unused]]
is an attributedouble A[2] = {
[1] = 2.9,
};
clang -std=c2x -Wall -lm -o output file.c
12'345.983'123
size_t strlen(char const string[static 1])
enforces that strlen should receive a non null pointer and should have at least 1 element
in practice they get rewritten
no longer need stdbool.h
Level
Name
Other
Category
Where
printf
0
size_t
Unsigned
<stddef.h>
"%zu" "%zx"
0
double
Floating
Built in
"%e" "%f" "%g" "%a"
0
signed
int
Signed
Built in
"%d"
0
unsigned
Unsigned
Built in
"%b" "%o" "%u" "%x"
0
bool
_Bool
Unsigned
Built in (since C23)
"%d" as 0 or 1
1
ptrdiff_t
Signed
<stddef.h>
"%td"
1
char const*
String
Built in
"%s"
1
char
Character
Built in
"%c"
1
void*
Pointer
Built in
"%p"
2
unsigned char
Unsigned
Built in
"%hhu" "%02hhx"
constexpr
— Kunal