**输入格式要求:"%d" 提示信息:"input a string:\n" "input start point:\n"
**输出格式要求:puts(s2)
程序运行示例如下:
input a string:
hello,world!
input start point:
7
world!
#include<stdio.h>
#define N 50
void strcpym(char s1[N], char s2[N], int n)
{
int i, j;
for(i = 0, j = n - 1; s1[j] != '\0'; i++, j++)
{
s2[i] = s1[j];
}
s2[i] = '\0';
}
int main()
{
char s1[N], s2[N];
int m, i;
printf("input a string:\n");
gets(s1);
printf("input start point:\n");
scanf("%d", &m);
strcpym(s1, s2, m);
s2[i] = '\0';
puts(s2);
return 0;
}