How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / emperor of america
using bitwise operator works 100%:
x^=y;
y^=x;
x^=y;
using +/- works sometime, need to consider overflow.
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How can I access an I o board directly?
Why can’t constant values be used to define an array’s initial size?
What is the use of printf() and scanf() functions?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
show how link list can be used to repersent the following polynomial i) 5x+2
Explain data types & how many data types supported by c?
What is difference between structure and union in c programming?
What are near, far and huge pointers?
What is the use of sizeof () in c?
What are the different data types in C?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
program for reversing a selected line word by word when multiple lines are given without using strrev
What does 4d mean in c?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????