字符串链接

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, const char * argv[]) {
    char a[200];
    while(gets(a) != NULL ){
        int space = 0;
        while(a[space] != ' ') space ++;
        for(int i = space;a[i] != '\0';i ++){
            a[i] = a[i + 1];
        }
        puts(a);
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_36372879/article/details/79121842
今日推荐