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

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*            EXCHANGE(X,X,X)           */
  4. /*                    */
  5. /* Switches the contents of two integer */
  6. /* arrays.  The first two arguments are */
  7. /* the arrays being switched. The third */
  8. /* argument is the dimension of the    */
  9. /* array.                */
  10. /*                    */
  11. /*--------------------------------------*/
  12. void exchange(a,b,c)
  13. int a[],b[],c;
  14. {
  15.         int j;
  16.         for (j=0;j<c;j++)
  17.              swap(&a[j],&b[j]);
  18. }
  19.