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 / satish

#include<stdio.h>
void main()
{
int x,y;
printf("enter x and y: ");
scanf("%d%d",&x,&y);
x^=y^=x^=y;
printf("elements after swapping: %d,%d\n",x,y);
}

Is This Answer Correct ?    20 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the string functions? List some string functions available in c.

955


What does c mean in standard form?

1121


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2357


How to get string length of given string in c?

1024


What is the difference between fread buffer() and fwrite buffer()?

1125


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15745


What is sizeof array?

1015


What is the sizeof () a pointer?

936


What is a volatile keyword in c?

1125


How can I run c program?

1136


What is logical error?

1073


Is null valid for pointers to functions?

1122


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3866


How are strings stored in c?

986


Tell me what is null pointer in c?

1034