久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      鏈表的c語言實(shí)現(xiàn)(五)

      3、刪除
      假如我們已經(jīng)知道了要?jiǎng)h除的結(jié)點(diǎn)p的位置,那么要?jiǎng)h除p結(jié)點(diǎn)時(shí)只要令p結(jié)點(diǎn)的前驅(qū)結(jié)點(diǎn)的鏈域由存儲(chǔ)p結(jié)點(diǎn)的地址該為存儲(chǔ)p的后繼結(jié)點(diǎn)的地址,并回收p結(jié)點(diǎn)即可。
      以下便是應(yīng)用刪除算法的實(shí)例:
      #include <stdio.h>
      #include <malloc.h>
      #include <string.h>
      #define N 10

      typedef struct node
      {
      char name[20];
      struct node *link;
      }stud;

      stud * creat(int n) /*建立新的鏈表的函數(shù)*/
      {
      stud *p,*h,*s;
      int i;
      if((h=(stud *)malloc(sizeof(stud)))==NULL)
      {
      printf(“不能分配內(nèi)存空間!”);
      exit(0);
      }
      h->name[0]=’