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 is pointers in c with example?

1053


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1969


In which layer of the network datastructure format change is done

1875


Why are algorithms important in c program?

1100


How can I get the current date or time of day in a c program?

1208


What is string concatenation in c?

1077


What is string constants?

1137


What is the difference between procedural and declarative language?

1128


Explain what is the best way to comment out a section of code that contains comments?

1128


How do you use a pointer to a function?

1068


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1850


Can a program have two main functions?

1110


What are static variables in c?

1065


What are variables and it what way is it different from constants?

1222


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3501