Search This Blog

Most Viewed

Wednesday, January 19, 2011

The Swapping of Integers without using a Third One........

  The Swapping of Integers is very complicated task to mess with. There are several way of doing this, the most popular way of doing this is as

  temp=a;
  a=b;
  b=a;

but this whole task can be done in one single line. That is

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

This is very simple one line code.....

No comments:

Post a Comment

If the contents is insufficient or if there any error, please write here....


Suggestion are welcome:

Popular Posts