链表

#include <stdio.h>
#include <stdlib.h>

struct node
{
int data;
node* next;
};

node* createNode(int data)
{
node* temp_node = NULL;
temp_node = (node*)malloc(sizeof(node));
temp_node->data = data;
temp_node->next = NULL;
return temp_node;
}

int main()
{
node* temp_node = createNode(10);
printf("%d ", temp_node->data);
printf("%d ", temp_node->next);
return 0;
}

原文地址:https://www.cnblogs.com/liujianing/p/9345957.html