Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- struct clasa{
- char nume[256];
- int id;
- struct elev *elevi;
- struct clasa *urm;
- };
- struct elev{
- char nume[256];
- struct elev *urm;
- };
- struct clasa *start = NULL;
- void adauga_clasa(char nume[256], int id)
- {
- struct clasa *t;
- t = (struct clasa*)malloc(sizeof(struct clasa));
- t->id=id;
- t->urm = NULL;
- strcpy(t->nume,nume);
- if(start == NULL)
- {
- start = t;
- return;
- }
- t->urm = start;
- start = t;
- }
- int main()
- {
- printf("Hello world\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement