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

how to find binary of number?

4534


Why do we use stdio h and conio h?

1134


With the help of using classes, write a program to add two numbers.

1077


Explain what is the difference between the expression '++a' and 'a++'?

1262


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1128


What are header files in c programming?

1179


Explain the priority queues?

1139


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1192


write a program to concatenation the string using switch case?

2147


Explain the use of 'auto' keyword

1171


Why do we need arrays in c?

1212


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1236


What is the g value paradox?

1249


Write a program to use switch statement.

1184


What is the use of getchar functions?

1231