单点时限: 2.0 sec
内存限制: 256 MB
定义函数 strmcpy
, 从一个字符串 (长度不超 80) 的第 $m$ 个字符(下标从 0 开始)开始将后面的所有字符复制到另一个字符串中。
/***************************************************************/
/* */
/* DON'T MODIFY main function ANYWAY! */
/* */
/***************************************************************/
#include <stdio.h>
#define N 80
//********** Specification of strmcpy **********
char* strmcpy(char* t, char* s, int m)
/* PreCondition:
t points to an array,
s points to another array,
m is less than length of string s
PostCondition:
copy s starting from m into t, and return t
*/
{ //TODO: your function definition
}
/***************************************************************/
int main()
{
char s[N+1],t[N+1]; int m;
gets(s); scanf("%d",&m);
//********** strmcpy is called here *************************
printf("%s\n",strmcpy(t,s,m));
//***********************************************************
return 0;
}