※ 引述《CoSNaYe ( ~~)》之銘言:
: ====================================================================
: #include <stdio.h>
: void strcat_user (char *, char *);
: int main(int argc, const char * argv[]) {
:     char ori[30] = "hello, ";
:     char add[] = "world.";
:     strcat_user(ori, add);
:     //strcat_user(&ori[0], &add[0]);
:     printf("%s\n", ori);
:     return 0;
: }
: void strcat_user (char *ori, char *add){
:     while (*ori++)
:         ;
:     while ((*ori++ = *add++))
:         ;
: }
: ==========================================================
你的程式在動作後
ori[30] 會存入這些東西 hello, '\0'world.'\0'
但是 printf("%s\n", ori); 遇到hello, 後面的'\0'
就會停止輸出
相信你知道要怎麼修正了:)