Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Write a program to interchange two variables without using
the third variable?

Answer Posted / kumar

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
a=b-0;
b=a-0;
printf("a=%d b=%d",a,b);
getch();
}

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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.

672


What are actual arguments?

269


Why we write conio h in c?

204


What is a pointer and how it is initialized?

210


What are the types of pointers in c?

200






Why do we use pointer to pointer in c?

202


How can I convert a number to a string?

230


write a program to rearrange the array such way that all even elements should come first and next come odd

1327


What is the difference between functions abs() and fabs()?

253


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

841


What is the sizeof () a pointer?

187


Do you know the use of 'auto' keyword?

224


What is string constants?

232


What are the keywords in c?

186


What is a protocol in c?

194