Código
#include <stdlib.h>
#include <stdio.h>
typedef struct{
char marca[15];
int anio;
}tipocarro;
typedef struct estrunodo {
tipocarro datos;
struct estrunodo *siguiente;
} tipoNodo;
typedef tipoNodo *apunpila;
typedef tipoNodo *apunnodo;
void push(apunpila *tope,tipocarro b);
void pop(apunpila *tope,tipocarro *b);
main() {
tipocarro carro;
int i,cont=0,num;
apunpila pila = NULL;
while(cont<5){
push(&pila,carro);
cont++;
}
for(i=1;i<=num;i++){
if (pila==NULL)
else{
pop(&pila,&carro);
}
}
}
void push(apunpila *tope,tipocarro b){
apunnodo p;
p->datos = b;
p->siguiente = *tope;
*tope = p;
}
void pop(apunpila *tope,tipocarro *b){
apunnodo p;
p = *tope;
*tope = p->siguiente;
*b= p->datos;
}





 Autor
 Autor
		

 En línea
									En línea
								
 
						 
						