85 cards across 4 sections
C23
nullptr
constexpr
auto
typeof
#embed
bool
valgrind
C17
typeof_unqual
true
false
C2Y
&x
x
*p
p
sizeof(*p)
p + 1
int*
sizeof
int **pp
int *
const int *p
int *const p
int (*fp)(int)
int
void *
char
\0
strlen
"hi"
char[3]
malloc(n)
n
NULL
malloc
free
calloc
realloc
struct
.
->
sizeof(struct)
union
unsigned flag : 1;
typedef struct Point Point;
enum Color { RED, GREEN, BLUE };
Point p = { .x = 1, .y = 2 };
#define MAX 100
#define SQ(x) ((x)*(x))
#ifdef
#ifndef
#if
#define
#endif
#pragma once
static
extern
.c
.o
short
long
long long
unsigned int
const
volatile
stdint.h
int32_t
uint8_t
(double)x
<=
<
gets
strcpy
strcat
sprintf
printf
scanf
fopen
fread
stdio.h
stdlib.h
exit
atoi
strtol
qsort
string.h
memcpy
strncpy
-Wall -Wextra -Werror
-fsanitize=address
-fsanitize=undefined
valgrind --tool=memcheck
int *p = malloc(n * sizeof *p);if (!p) { perror("malloc"); exit(1); }
if (n > SIZE_MAX / sizeof *p) abort();int *p = malloc(n * sizeof *p);
snprintf
char buf[32];snprintf(buf, sizeof buf, "%d", value);
free(p);p = NULL;
gcc
gcc -Wall -Wextra -Werror -o app main.c
malloc(n * sizeof *p)
malloc(n * sizeof(Type))
Point *pts = malloc(n * sizeof *pts);
const char *s
size_t count(const char *s) { return strlen(s);}
#ifndef POINT_H#define POINT_H// ...#endif
fgets
char line[128];fgets(line, sizeof line, stdin);
gcc -fsanitize=address -g -o app main.c
valgrind --leak-check=full
valgrind --leak-check=full ./app
static int helper(int x) { return x * 2;}
int *p = malloc(n * sizeof *p);if (!p) return -1;// ...free(p);
int *p = NULL;
int *p = NULL;if (cond) p = malloc(sizeof *p);
struct Point p = { .x = 1, .y = 2 };
for (i = 0; i <= n; i++)
n + 1
%d
double
%s
-Wformat
f(i++, i++)
#include <stdlib.h>
unsigned