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 / manas ranjan(gift)

#include<stdio.h>
void main()
{
int a,b;
printf("enter the numbers");
scanf("%d%d",&a,&b);
printf("before swaping the values are");
printf("a=%d,b=%d",a,b);
void swap(int,int);
swap(a,b);
}
void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do mean by network ?

1099


What is atoi and atof in c?

1027


What is the difference between class and object in c?

1087


Explain enumerated types.

974


Is c a great language, or what?

1049


What is the difference between fread and fwrite function?

1033


What is the difference between malloc() and calloc()?

1687


Why doesnt the call scanf work?

1137


Which driver is a pure java driver

1529


Tell us something about keyword 'auto'.

1010


What is the use of clrscr?

1050


What does %d do?

1205


Explain Basic concepts of C language?

1077


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1014


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

1116