#include <iostream> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); int m; cin >> m; // write your code here...... char *p = NULL; p = &str[m-1]; printf("%s",p); return 0; } 大致思路:使用指针,将指针指向要分割的位置,然后直接进行输出。这样就只会把指针后面的字符串内容进行输出。