阅读背景:

C语言里遇到的一点问题

来源:互联网 

用纯c写一个字符串反转时发现了一个bug,用下面的程序测试下:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    int i;
    char s[100]={0};
    scanf("%s",s);
    printf("strlen(s)/2-1 等于 : %d\n",strlen(s)/2-1);
    for(i=0;i<=strlen(s)/2-1;i++)
        printf("xxx\n");#include <std



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: