文档介绍:源代码:
#include<>
#include<>
#define null 0
#define max 50
typedef struct sn{
char data;
struct sn *next;
}node;
int ishw(node *head,int n){
char stack[max];
    int top=0;
    node *p;
    p=head->next;
    while(top<n/2)
    {
        stack[top]=p->data;
        top++;
        p=p->next;
    }
    top--;
    if(n%2==1) p=p->next;
    while(top>=0)
    {
        if(stack[top]!=p->data) return 0;
        top--;
        p=p->next;
    }
    return 1;
}
int push(node *head,char *s)
{   int i;
node *p,*q;
    p=head;
    for(i=0;s[i]!='@';i++)
    {       q=(node *)malloc(sizeof(node));
        q->data=s[i];
        q->next=null;
        p->next=q;
        p=q;
    }   
return(i);