3109. strmcpy

Naive函数字符串普通指针函数指针

时间限制:2000 ms

内存限制:256 MiB

题面

定义函数 strmcpy, 从一个字符串 (长度不超 80) 的第 mm 个字符(下标从 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;
}