wat are the two methods for swapping two numbers without
using temp variable??
Answer Posted / saida
int a=4,b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("After swapping: a=%d, b=%d",a,b);
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is int a keyword in c?
Write a program on swapping (100, 50)
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.
Why do we use null pointer?
How to declare a variable?
What are structures and unions? State differencves between them.
What's the right way to use errno?
What is structure and union in c?
What are derived data types in c?
What are the __date__ and __time__ preprocessor commands?
Explain how do you determine the length of a string value that was stored in a variable?
Subtract Two Number Without Using Subtraction Operator
Which type of language is c?
What is build process in c?
What do you mean by keywords in c?