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 swap Two numbers without using temp variable.

Answer Posted / ashish kumar sharma

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the Value of a:\n");
scanf("%d",&a);
printf("enter the Value of b:\n");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("Display The Swapping:\n");
printf("a=%d And b=%d",a,b);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the functions strcat() and strcmp()?

1058


What is void c?

1108


What are the advantages of using macro in c language?

1138


What is dynamic memory allocation?

1344


Write a program to print fibonacci series using recursion?

1068


Apart from dennis ritchie who the other person who contributed in design of c language.

1406


Explain main function in c?

1088


Explain why can’t constant values be used to define an array’s initial size?

1361


What is sizeof array in c?

1064


What is the difference between int main and void main in c?

1182


Explain what is the benefit of using #define to declare a constant?

1197


what is recursion in C

1075


find out largest elemant of diagonalmatrix

2256


What is a structure and why it is used?

1229


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3524