Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Node{
- int num;
- struct Node *prox;
- };
- typedef struct Node node;
- int tam;
- int vazia(node *LISTA)
- {
- if(LISTA->prox == NULL)
- return 1;
- else
- return 0;
- }
- node *aloca()
- {
- node *novo=(node *) malloc(sizeof(node));
- if(!novo){
- printf("Sem memoria disponivel!n");
- exit(1);
- }else{
- printf("Novo elemento: ");
- scanf("%d", &novo->num);
- return novo;
- }
- }
Add Comment
Please, Sign In to add comment