问答题

#include "stdafx.h"

#include "stdio.h"

define StackSize 100

typedef char DataType ;

typedef Struct {

DataType data [StackSize] ;

int top ;

} SeqStack ;

int ISHuiWen (char *t)

{//判断t字符向量是否是回文,若是,返1,否则返回0

SeqStack s;

int i,len ;

char temp ;

InitStack(&s);

len<strlen(t);

for(i=0;i<len/2;i++)

push (&s,t[i]) ;

while (!EmptyStack(&s))

{temp=pop(&s);

if(temp!=s[i])

return 0;

else i++

return 1;

【参考答案】

#include "stdafx.h"#include "stdio.h"define StackSize 100typ......

(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)