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 / ragini

#include<stdio.h>
#include<conio.h>
void swap(int a,int b);
void main()
{
int a,b;
swap(a,b);
printf("Enter the 2 nos");
scanf("%d%d",&a,&b);
}
void swap(int x,int y)
{
x=x*y;
y=x/y;
x=x/y;

}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #ifdef ? What is its application?

1077


What are the advantages of c preprocessor?

1227


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

1146


Explain what will the preprocessor do for a program?

1034


What is scanf () in c?

1092


What is malloc calloc and realloc in c?

1252


Which header file is essential for using strcmp function?

1449


What are preprocessor directives in c?

1059


Do string constants represent numerical values?

1347


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

979


What is function prototype in c with example?

1029


how to construct a simulator keeping the logical boolean gates in c

2228


Is exit(status) truly equivalent to returning the same status from main?

1028


What is the difference between union and anonymous union?

1270


What are the 5 elements of structure?

1058