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...

there are 2 variables called x and y ,x contains 1,2 and y
contains 3,4 we have to swap the values from x to y and y
to x with out using dummy variables and it can be done only
by using a single statement ? how?

Answer Posted / divya c

(y!=x)||(x!=y)?x=y,y=x:y=x,x=y;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to move files from one directory to another in pl sql?

1130


Is it important to partition hard disk?

967


Describe different types of general function used in sql?

980


How do you get column names only for a table (sql server)?

1102


Explain the types of joins in sql?

966


what is the difference between clustered and non clustered index in sql? : Sql dba

1050


How do we use distinct statement? What is its use?

977


What is left join example?

891


Can we use join in subquery?

1023


What is inner join in sql?

1004


How do you explain an index number?

1024


What is on delete restrict?

945


What is the difference between microsoft access and sql?

962


How do you modify a table in sql?

1068


Why functions are used in sql?

932