Add struct and linked list example on struct obj
This commit is contained in:
parent
3762d25f4e
commit
bcbcbdcd37
25
tests/test1.c
Normal file
25
tests/test1.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include "stdio.h"
|
||||||
|
#include "stdlib.h"
|
||||||
|
|
||||||
|
struct person {
|
||||||
|
char name[20];
|
||||||
|
int age;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct student {
|
||||||
|
int id;
|
||||||
|
struct person info;
|
||||||
|
struct student *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
void add_first();
|
||||||
|
void add_last();
|
||||||
|
void remove_first();
|
||||||
|
void remove_last();
|
||||||
|
void show();
|
||||||
|
void quite();
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
printf("Goodbye!");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user