MIPI_AdvancedC_FRTK/Lect7/10_1_1.c

24 lines
370 B
C
Raw Normal View History

2024-11-14 08:45:50 +03:00
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct list {
uint32_t id;
struct list *next;
} list;
int main(void)
{
list* head=NULL;
head = calloc(1,sizeof(list));
head->id = 1;
head->next = calloc(1,sizeof(list));
head->next->id = 2;
printf("%d %d\n",head->id, head->next->id);
return 0;
}