MDGSF Software Engineer

[C/C++] strcat 库函数实现

2016-03-11
 

char *
strcat(char *pcDest, char *pcSrc)
{
    assert((pcDest != NULL) && (pcSrc != NULL));
    char * pcAddress = pcDest;
    while(*pcDest != '\0')
    {
        pcDest ++;
    }
    while( (*pcDest++ = *pcSrc++) != '\0' )
    {
    }
    return pcAddress;
}

weixingongzhonghao

Similar Posts

Comments