How to swap two values using a single variable ?
condition: Not to use Array and Pointer ?
Answer Posted / aditya
main(){
int a=10,b=20;
printf("%d%d",a,b);
a^=b,b^=a,a^=b;
printf("%d%d",a,b);
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the two forms of #include directive?
What is echo in c programming?
Why cant I open a file by its explicit path?
Suggesting that there can be 62 seconds in a minute?
What is meant by type specifiers?
The file stdio.h, what does it contain?
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.
Differentiate Source Codes from Object Codes
Explain continue keyword in c
If null and 0 are equivalent as null pointer constants, which should I use?
When is the “void” keyword used in a function?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
Is it possible to execute code even after the program exits the main() function?
Write a program to print fibonacci series using recursion?
What are c header files?