CATEGORII DOCUMENTE |
Implementarea cozilor prin tipul pointer, elemente intregi
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <ctype.h>
typedef int tipelement;
typedef struct nod
Tnod;
typedef Tnod *ref;
typedef struct
Coada;
int er,n;
void initializare(Coada *c)
/* initializare */
int cvid(Coada c)
/* cvid */
tipelement primul(Coada c)
else return c.fata->urm->element;
} /* primul */
void adauga(tipelement x, Coada *c)
/* adauga */
void sterge(Coada *c)
else
}/* sterge */
void listare(Coada c)
else
putchar('n');
}
}/* listare */
void creare(Coada *c)
clrscr();
initializare(c);
do
else printf('Ati tastat nr. incorect!n');
printf('Continuati?[D/N]'');
fflush(stdin);
scanf('%c',&ch);
ch=toupper(ch);
}
while (ch=='D');
}/*creare*/
ref cautare(tipelement x,Coada c)
/* cautare */
int main(void)
break;
case 'L': break;
case 'E': break;
default: printf('Optiune gresita!n');
break;
}/*switch*/
listare(c);
printf('Tastati Enter!');
fflush(stdin);
getch();
} while (op!='E');
return 0;
}
Politica de confidentialitate | Termeni si conditii de utilizare |
Vizualizari: 934
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved