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

#define   MAX     256

void  move_stars(char* str) {
    int len = strlen(str) - 1;
    char* p = str + len;
    char* q = p;
    for (;len >= 0; --len, --q) {
        if (isalpha(*q)) {
            *p-- = *q;
        }
    }
    ++p;
    while (str != p) {
        *str++ = '*';
    }
}

int  main(void) {
    char  str[MAX];
    fgets(str, MAX, stdin);
    str[strlen(str)-1] = '\0';
    move_stars(str);
    fprintf(stderr, "%s\n", str);
    system("pause");
    return  0;
}

 

相关文章:

  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2021-06-13
猜你喜欢
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案