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...

How many ways are there to swap two numbers without using
temporary variable? Give the each logic.

Answer Posted / chandan doki

void main()
{
int a,b;
printf("eneter any two values for a and b");
scanf("%d%d",&a,&b);
b=a+b;
a=b-a;
b=b-a;
printf("a=%d\nb=%d",a,b);
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 5 elements of structure?

1084


Explain how do you determine a file’s attributes?

1050


What are the disadvantages of c language?

1200


How can you determine the size of an allocated portion of memory?

1314


Give me the code of in-order recursive and non-recursive.

1378


What is dynamic variable in c?

1035


How can I get back to the interactive keyboard if stdin is redirected?

1192


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

6322


What is static function in c?

1121


By using C language input a date into it and if it is right?

1087


What do you mean by scope of a variable in c?

1015


How does pointer work in c?

1129


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1082


What is the difference between memcpy and memmove?

1035


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1254