?return0;}判断该顺序表中元素是否对称,对称返回1,否则返回0。intlistsymmetry(sqlistL){?int*q,*p;?q=L.elem;?p=L.elem+L.length-1;?while(q<=p){ if(*q==*p){ ++q; --p; returntrue; } else returnfalse;?}}实现把该表中所有奇数排在偶数之前,即表的前面为奇数,后面为偶数。intorder(sqlist&L){?int*q,*p,j;?p=L.elem;?q=L.elem;?for(;q<=L.elem+L.length-1;q++){ if(*q%2!=0){ j=*p; *p=*q; *q=j; p++; }?}?return0;}试着将程序改为无指针的顺序表实现。intgetelem(sqlistL,inti,inte){?if(i<1||i>L.length) exit(ERROR);?e=L.elem[i-1];?returnOK;}intlocateelem(sqlistL,inte,pare(intx1,intx2)){?inti=1,j=0;?while(i<=L.length&&!j)?{ pare(L.elem[i-1],e); ++i;?}?if(i<=L.length) returni-1;?else returnFALSE;}intpriorelem(sqlistL,intcur_e,intpre_e){?inti=2;?while(i<=L.length&&L.elem[i-1]!=cur_e) i++;?if(i>L.length) returnFALSE;?else?{ pre_e=L.elem[i-2]; returnOK;?}}intnextelem(sqlistL,intcur_e,intnext_e){