Embedded and Network Software Programmer Concepts
Wednesday, 28 June 2017
Swap the variable without tmp variable
swap(int *a, int *b) {
*a ^= *b ^= *a ^= *b;
}
Another Method
a=a+b;
b=a-b;
a=a-b;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment