标签:www c++ strcpy href print led code 幽默 world
#include "stdio.h"
// Copies a string.
//
// strDestination: Destination string.
// strSource: Null-terminated source string.
//
// Returns the destination string.
char * MyStrcpy(char *strDestination, const char *strSource )
{
char *tmp = strDestination;
while(*strDestination++ = *strSource++)
;
*strDestination = ‘\0‘;
return tmp;
}
int main(int argc, char* argv[])
{
char s1[] = "Hello, World!";
char s2[20];
MyStrcpy(s2, s1);
printf("%s\n", s2);
return 0;
}
// Output:
/*
Hello, World!
*/
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!希望你也加入到我们人工智能的队伍中来!http://www.captainbed.net
标签:www c++ strcpy href print led code 幽默 world
原文地址:https://www.cnblogs.com/kwincaq/p/10109819.html