字符串拼接/比较

//字符串拼接
    /*    char a[20]="iphone";   //a必须留上足够的容量  以便拼接b
    char b[]="6plus";
    strcat(a,b);
    printf("%s",a);
    */
//字符串比较
    /*
    char a[]="ab";    //在第二位上面比出来大小 后面的不比较
    char b[]="aac";
    int f= strcmp(a,b);
    printf("%d",f);
    */

posted on 2015-07-24 11:52  yucaijiang  阅读(230)  评论(0编辑  收藏  举报

导航