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

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

Is This Answer Correct ?    185 Yes 32 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is swift based on c?

1057


What are the different types of objects used in c?

974


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1157


Explain what is wrong in this statement?

1070


while initialization of array why we use a[][2] why not a[2][]...?

2307


What is the g value paradox?

1106


What is meant by recursion?

999


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1783


What is the concatenation operator?

1091


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2139


How do I send escape sequences to control a terminal or other device?

1016


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

1134


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3844


Which type of language is c?

1025


How to compare array with pointer in c?

1055