#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 *newstr = (char*)malloc(sizeof(char) * (30 - m)); char *p = str; char *tmp = newstr; for(int i = 0; i < m - 1; i++) { p++; } while(*p != '\0') { *tmp = *p; tmp++; p++; } cout<<newstr<<endl; free(newstr); return 0; }