How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / srikanth
int x,y;
x =x-y;
y =y+x;
x =y-x;
or
int x,y;
x=x^y;
y=x^y;
x=x^y;
or
int x,y;
x*=xy;
y=x/y;
x=x/y;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
The difference between printf and fprintf is ?
show how link list can be used to repersent the following polynomial i) 5x+2
What is a macro?
What is the use of getch ()?
What are the advantages of using linked list for tree construction?
How pointers are declared?
Why clrscr is used in c?
Can you assign a different address to an array tag?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What is c method?
What is the use of linkage in c language?
Explain what are bus errors, memory faults, and core dumps?
What is the symbol indicated the c-preprocessor?
Explain about the constants which help in debugging?
Is c object oriented?