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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            CEXCHANGE(X,X,X)          */
  4. /*                    */
  5. /* Functionality:            */
  6. /*    Switches the contents of two     */
  7. /*     character arrays.        */
  8. /* Arguments:                */
  9. /*    0: One of the arrays to be    */
  10. /*   switched.            */
  11. /*    1: The other array to be    */
  12. /*       switched.            */
  13. /*     2: The length of the arrays.    */
  14. /* Returns: Nothing            */
  15. /* Author: John Callicotte        */
  16. /* Date created/modified: 09/01/88    */
  17. /*                    */
  18. /*--------------------------------------*/
  19.  
  20. void cexchange(a,b,c)
  21. int c;
  22. char a[],b[];
  23. {
  24.         int j;
  25.         char d;
  26.         for (j=0;j<c;j++){
  27.         d=a[j];
  28.         a[j]=b[j];
  29.         b[j]=d;
  30.        }
  31. }
  32.