Fork me on GitHub

\045在字符串中输出为%

int i;

    char *a="a\045+045\'b";

    printf("%s\n",a);  //a%+045'b

    for(i=0;*a++;i++)

    {

    printf("%d,%s\n",i,a);

0,%+045'b

1,+045'b

2,045'b

3,45'b

4,5'b

5,'b

6,b

7,

    }

    printf("%i",i);

8

posted on 2012-02-21 19:23  pengyingh  阅读(312)  评论(0)    收藏  举报

导航