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
What is null in c?
What are the loops in c?
Explain can static variables be declared in a header file?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
What is quick sort in c?
What library is sizeof in c?
What are structures and unions? State differencves between them.
What is pointer & why it is used?
Explain the difference between malloc() and calloc() in c?
What is the use of header?
What are linker error?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
How can I write functions that take a variable number of arguments?
What does dm mean sexually?