knowledge is divine
Thursday, January 6, 2011
my strcpy
#include
char* mystrcpy(char* dest, const char* src)
{
char* temp;
temp = dest;
while(*dest++ = *src++);
return temp;
}
int main()
{
char* s = "wazzup";
char* r;
printf("%s",s);
printf("after copying %s\n",mystrcpy(r,s));
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment