home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / stradd.c < prev    next >
Text File  |  1989-02-08  |  512b  |  21 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            STRADD(X,X,X)        */
  4. /*                    */
  5. /* Adds the string given in the second  */
  6. /* argument to the string given in the    */
  7. /* first argument and puts the result    */
  8. /* in the last argument.        */
  9. /*                    */
  10. /*--------------------------------------*/
  11. void stradd(a,b,c)
  12. char *a,*b,*c;
  13. {
  14.     int ctr,j;
  15.     ctr=strlen(a);
  16.     for (j=0;j<ctr;j++)
  17.              c[j]=a[j];
  18.     for (j=0;j<strlen(b);j++)
  19.              c[ctr++]=b[j];
  20.     c[ctr]=0;
  21. }