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...

How to swap values between two variables without using a
third variable?

Answer Posted / gourab varma

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter value of a and b");
scanf("%d%d", &a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("the value of a=%d\n the value of b is=%d", a, b);
getch();
}

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out

1882


design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.

17656


what are the advantages of sap on other software ?

2126


what is d main diff between the java and .net framework

1970


Find out the list of roles which gives access to GUI activities? thanks in advance

2102


write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?

2596


Is the IT field raise again? What is the position of IT after 4 years?

2149


Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;

1419


how will you code the subfile which is in editing mode (multiple case subfile)?

2064


Find out the list of authorization objects which contains activity as a field? Thanks in advance.

2158


what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?

2518


what are the topics choosen for jam round for interviews

1625


what is the last ant version you worked?how to get it

1914


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

1055


i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......

2127