08.11.2014 Views

c_kitap

c_kitap

c_kitap

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C ve Sistem Programcıları Derneği - C Ders Notları - Necati Ergin<br />

display_menu();<br />

scanf("%d", &option);<br />

if (option < 1 || option > 7)<br />

option = 0;<br />

return option;<br />

}<br />

/*************************************************************************/<br />

int main()<br />

{<br />

int option;<br />

ListHandle handle = openlist();<br />

for (;;) {<br />

option = get_option();<br />

switch (option) {<br />

case 1: push_front(handle); break;<br />

case 2: push_back(handle); break;<br />

case 3: display_list(handle);break;<br />

case 4: pop_front(handle);break;<br />

case 5: pop_back(handle);break;<br />

case 6: clear_list(handle); break;<br />

case 7: goto END;<br />

case 8: printf("invalid entry!\n");<br />

}<br />

}<br />

END:<br />

closelist(handle);<br />

printf("end of program!\n");<br />

}<br />

return 0;<br />

410

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!