intro-to-zig-talk/c/malloc.c

9 lines
102 B
C

#include <stdlib.h>
int main() {
int* ptr = malloc(sizeof(int));
*ptr = 4;
free(ptr);
}