#include <iostream> using namespace std; int main() { char str[30] = { 0 }; cin.getline(str, sizeof(str)); int m; cin >> m; char copystr[30]={0}; char *p=str+m-1; char *q=copystr; while(*p!='\0') { *q=*p; *p++; *q++; } cout<<copystr<<endl; // write your code here...... return 0; }