#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs?
Answer Posted / mannucse
10 5
5 10
| Is This Answer Correct ? | 9 Yes | 10 No |
Post New Answer View All Answers
Is r written in c?
How can I pad a string to a known length?
Is using exit() the same as using return?
Write a code to generate divisors of an integer?
Explain what are binary trees?
Explain what are the advantages and disadvantages of a heap?
What is table lookup in c?
What is void main ()?
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 are the types of functions in c?
What is extern keyword in c?
What are reserved words with a programming language?
Do pointers take up memory?
Explain what are the __date__ and __time__ preprocessor commands?
What’s the special use of UNIONS?