Advertisement
dllbridge

Untitled

Apr 17th, 2024
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3.  
  4.  
  5.  
  6.  void swap( int a2, int d2)
  7.  {
  8.      int v;
  9.      
  10.        v  = a2;
  11.        a2 = d2;
  12.        d2 = v;
  13.        
  14.    
  15.  }
  16.  
  17.  
  18. //////////////////////////////////////////////////////
  19. int main()
  20. {
  21.     int a =  4,
  22.         d = 10;
  23.  
  24.  
  25.     swap(a, d);
  26.  
  27.     printf(" a =  %d \n", a);
  28.     printf(" d =  %d \n", d);    
  29.  
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement