Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / debasis nayak

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the value of A and B");
scanf("%d %d",&a,&b);
b=(a+b-a=b);
printf("After interchange value are %d %d",a,b);
getch();
}

Is This Answer Correct ?    11 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you divide two numbers in a MACRO?

1141


Is it acceptable to declare/define a variable in a c header?

1128


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16798


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

1038


What is getch () for?

1245


Can we use any name in place of argv and argc as command line arguments?

1080


What is wrong with this statement? Myname = 'robin';

1328


What is a lookup table in c?

1124


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1166


What are the types of data structures in c?

1160


what is the syallabus of computer science students in group- 1?

2325


What does p mean in physics?

1049


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

1246


What is the use of pragma in embedded c?

1063


What is the difference between a free-standing and a hosted environment?

1152