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 / gana samantula

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf(" Enter the first No.:");
scanf("%d",&a);
printf(" Enter the second No.:");
scanf("%d",&b);
b=a+b-(a=b);
printf(" the swap of a and b numbers :%d %d",a,b);

getch();
}

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of unary operators?

1252


How can I send mail from within a c program?

1078


How do you define CONSTANT in C?

1367


What are void pointers in c?

1062


What are the 5 types of inheritance in c ++?

1073


What are multibyte characters?

1191


What is the auto keyword good for?

1231


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

4049


How many identifiers are there in c?

1085


How are 16- and 32-bit numbers stored?

1326


Explain what are reserved words?

1160


What is the use of parallelize in spark?

1064


i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me

1964


What are the disadvantages of c language?

1257


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

1207