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 / ramakanth

y=x+y-(x=y)

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain advantages of myisam over innodb? : Sql dba

601


Are subqueries faster than joins?

575


What is write ahead logging in sql server?

564


what is “go” in t-sql? : Transact sql

603


What program will open a mdb file?

500






What is meant by truncate in sql?

524


Why is there a need for sqlcode and sqlerrm variables?

587


Can two tables have same primary key?

531


What is normalization in a database?

612


What is sqlexception in java?

551


What is the mutating table and constraining table?

561


What is the difference among union, minus and intersect?

546


what are the advantages and disadvantages of cascading style sheets? : Sql dba

550


what are ddl statements in mysql? : Sql dba

579


List the various privileges that a user can grant to another user?

583