热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_45532227
Josvin
6 年前
trueweixin_45532227

FPGA数字信号处理(三)串行FIR滤波器Verilog设计

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
问问各位大佬,看看我下面这个判断回文字符的程序哪有问题,运行起有问题。#include<stdio.h>#include<string.h>int main(){ char str[50],*p1,*p2; int i,t=0; printf("Input:"); scanf("%s",str); p1=str;//从起始位置开始 p2=str+strlen(str)-1;//“strlen()”函数测量该字符串有效长度;从末位置开始。 for(i=0;i<(int)(strlen(str)/2);i++)//“strlen()”函数是unsigened型,用一个(int)强制转化。 { if(*(p1+i)!=*(p2-i)) { t=1;//给定一个非字符串回文字符标志 break; } } if(t=0) printf("%s\n","yes!"); else printf("%s\n","no!"); return(0);}
立即登录