libuwuc/tests/c/malloc.c
2023-10-04 21:35:18 +02:00

11 lines
No EOL
184 B
C

#include <stdlib.h>
#include <assert.h>
int main(void)
{
char *alloc = (char *)malloc(10);
assert(alloc && "allocation failed");
*alloc = 1;
*(alloc + 9) = 2;
free(alloc);
}