Friday, 23 September 2016

The beauty in conciseness

Today while studying pointers I came across this beautiful piece of code. This is a built-in function in the C library string.h .


/* strcpy: copies t to s */
void strcpy(char *s, char *t)
{
while(*s++=*t++);
}

No comments:

Post a Comment