/* 1: */ #include /* 2: */ #include /* 3: */ /* 4: */ typedef struct no { /* 5: */ char c; /* 6: */ struct no* prox; /* 7: */ } No; /* 8: */ /* 9: */ typedef No *Pilha; /* 10: */ /* 11: */ void cria_pilha(Pilha *p) { /* 12: */ p = NULL; /* 13: */ } /* 14: */ /* 15: */ void empilha(Pilha *p, char *c) { /* 16: */ No *n = (No *) malloc (sizeof (No)); /* 17: */ n->c = *c; /* 18: */ n->prox = p; /* 19: */ p = &n; /* 20: */ } /* 21: */ /* 22: */ int main() { /* 23: */ Pilha *p; /* 24: */ char *c; /* 25: */ /* 26: */ cria_pilha(p); /* 27: */ scanf("%c ", c); /* 28: */ empilha (p, c); /* 29: */ return 0; /* 30: */ }