GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Integra
 Integra  |  Question 1 of 1    Print  
can we use the swapping function in one statement?

  
Total Answers and Comments: 4 Last Update: August 27, 2008     Asked by: farooq 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 12, 2006 01:01:35   #1  
rakesh        

RE: can we use the swapping function in one statement?...

yes we can do it

void swap(int *a int *b){a a+b; b a-b;a a-b;}

just call this function as

swap(a b);

swapping has done

bye..


 
Is this answer useful? Yes | No
July 24, 2006 14:42:17   #2  
ratnesh Member Since: July 2006   Contribution: 2    

RE: can we use the swapping function in one statement?...

yes we can do it..

just call following function

swap(int a int b){a a^b;b a^b;a a^b;}


 
Is this answer useful? Yes | No
July 28, 2006 01:24:52   #3  
shyamsundar        

RE: can we use the swapping function in one statement?...

a 3;a 5;

a a+b;b a-b;a a-b;


 
Is this answer useful? Yes | No
August 27, 2008 13:36:24   #4  
guessme35 Member Since: August 2008   Contribution: 1    

RE: can we use the swapping function in one statement?
Answer is


a (a+b)-(b a);



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Related Categories
Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape