Problem1945--使用函数实现字符串部分复制

1945: 使用函数实现字符串部分复制

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

本题要求编写函数,将输入字符串t中从第m个字符开始的全部字符复制到字符串s中。 函数接口定义: void strmcpy( char *t, int m, char *s ); 函数strmcpy将输入字符串char *t中从第m个字符开始的全部字符复制到字符串char *s中。若m超过输入字符串的长度,则结果字符串应为空串。 裁判测试程序样例: #include #define MAXN 20 void strmcpy( char *t, int m, char *s ); void ReadString( char s[] );

Input

字符串t,开始字符序号m

Output

函数strmcpy将输入字符串char *t中从第m个字符开始的全部字符复制到字符串char *s中。若m超过输入字符串的长度,则结果字符串应为空串。

Sample Input Copy

7
happy new year

Sample Output Copy

new year

Source/Category

219