Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- struct node
- {
- int x;
- double y;
- struct node *next;
- };
- struct node *frist = NULL, *temp;
- void creat()
- {
- struct node *head, *head2, *head3;
- head = (struct node *) malloc(sizeof(struct node));
- head2 = (struct node *) malloc(sizeof(struct node));
- head3 = (struct node *) malloc(sizeof(struct node));
- head -> x = 7;
- head -> y = 2.1;
- head2 -> x = 9;
- head2 -> y = 1.2;
- head3 -> x = 11;
- head3 -> y = 3.2;
- head -> next = head2;
- head2 -> next = head3;
- head3 -> next = NULL;
- frist = head;
- }
- void print()
- int main()
- {
- creat();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement