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 to swap two values using a single variable ?

condition: Not to use Array and Pointer ?

Answer Posted / jyotsna

let take a single variable 'x'
a=3
b=2
hence
x=a;
a=b;
b=x;
swapping is occured now a=2 and b=3

Is This Answer Correct ?    10 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is auto keyword in c?

1160


How can I recover the file name given an open stream?

946


Give basis knowledge of web designing ...

1981


What is a floating point in c?

1008


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

5001


What is typedf?

1066


how to write optimum code to divide a 50 digit number with a 25 digit number??

3204


When is a void pointer used?

1192


Do array subscripts always start with zero?

1237


Differentiate between functions getch() and getche().

988


How to implement a packet in C

2831


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1159


What is bin sh c?

987


Why can arithmetic operations not be performed on void pointers?

982


What are structural members?

954