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
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
What is the difference between Printf(..) and sprint(...) ?
When should a type cast be used?
Can you tell me how to check whether a linked list is circular?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
What is logical error?
When should you use a type cast?
What does nil mean in c?
What is a memory leak? How to avoid it?
What is call by value in c?
Describe wild pointers in c?
What do mean by network ?
Is a pointer a kind of array?
Write a program to print "hello world" without using a semicolon?