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

which is an algorithm for sorting in a growing Lexicographic order

1747


Why we write conio h in c?

964


Define circular linked list.

976


Can you please explain the difference between strcpy() and memcpy() function?

1015


How do you view the path?

1077


What is storage class?

1015


Difference between goto, long jmp() and setjmp()?

1124


Why c is called free form language?

970


a program that can input number of records and can view it again the record

1864


What is a spanning Tree?

1501


Difference between Function to pointer and pointer to function

1019


What is the difference between exit() and _exit() function in c?

1019


Describe the order of precedence with regards to operators in C.

1002


Explain what is the purpose of "extern" keyword in a function declaration?

1029


Write a code on reverse string and its complexity.

981