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 / mahendra giri

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

Is This Answer Correct ?    23 Yes 44 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe newline escape sequence with a sample program?

1128


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

3069


How to declare pointer variables?

1250


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1137


In which layer of the network datastructure format change is done

1892


What do the functions atoi(), itoa() and gcvt() do?

1197


What is the 'named constructor idiom'?

1099


What are the advantages of using macro in c language?

1138


Explain what is a stream?

1097


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1066


Write a program to identify if a given binary tree is balanced or not.

1172


How can I delete a file?

1070


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2700


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1205


Why doesnt long int work?

1052