#include<stdio.h> #include<stdlib.h> int main() { char * str; str = (char*)malloc(30*sizeof(char)); scanf("%s",str); int n; scanf("%d",&n); printf("%s",str+n-1);//str指向h,h+6=o,因此h+(n-1) return 0; }