Files
CS-Classes/CS326/test.c
2025-06-17 14:42:22 -07:00

23 lines
243 B
C

#include <cstdlib>
#include <cstdio>
typedef struct
{
int a;
char * b;
} Cell;
void AllocateCell(Cell **q) {
*q = (Cell *) malloc(sizeof(Cell));
}
int main() {
Cell *c;
AllocateCell(&c);
c->a = 1;
free(c);
return 0;
}