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 / jisha. k.a

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

Is This Answer Correct ?    34 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept and use of type void.

1119


Describe the modifier in c?

1106


Explain the difference between getch() and getche() in c?

1003


Do you know what are bitwise shift operators in c programming?

1113


Define recursion in c.

1292


What is typedef?

1437


Write a program of prime number using recursion.

1097


How can I ensure that integer arithmetic doesnt overflow?

1178


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2137


What's the difference between constant char *p and char * constant p?

1154


What are structure members?

1098


How can you find the exact size of a data type in c?

1005


What are the advantages and disadvantages of c language?

1020


What is c language used for?

991


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1067