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 prgram of swapping with 2 valiables

Answer Posted / vijay r15

#include<stdio.h>
Void main()
{
int a=10,b=20;
a=a+b-(a=b);
// or use temp var
//or use a^=b^=a
//or use a=a+b;b=a-b;a=a-b;
printf("%d%d",a,b);
}

Any dbt mail to raj.vijay55@gmail.com

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are nested functions in c?

975


What is || operator and how does it function in a program?

1040


How will you write a code for accessing the length of an array without assigning it to another variable?

1000


How old is c programming language?

963


How can I determine whether a machines byte order is big-endian or little-endian?

1002


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1034


Can stdout be forced to print somewhere other than the screen?

1013


What are predefined functions in c?

1021


What does c mean before a date?

1103


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

3456


Why main is not a keyword in c?

1174


what is ur strangth & weekness

2329


Why do some versions of toupper act strangely if given an upper-case letter?

1036


What are local static variables?

1080


What does the characters “r” and “w” mean when writing programs that will make use of files?

1421