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 temporary
variable?

Answer Posted / sam

let a and b be variables
a^=b^=a^=b;
by performing this logic from right hand side we can swap
two variables

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is wild pointer in c with example?

1064


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

2313


Write a program to check whether a number is prime or not using c?

1058


Where are local variables stored in c?

1048


When we use void main and int main?

1090


which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

2064


How are variables declared in c?

1103


What does static variable mean in c?

1108


Are local variables initialized to zero by default in c?

1053


What is the use of sizeof?

1020


What are the types of data structures in c?

1155


What is the g value paradox?

1173


What do you mean by a sequential access file?

1085


What is omp_num_threads?

1085


How can I dynamically allocate arrays?

1104