swap two number wthout using third variable

Answer Posted / suyog

A very simple and cute answer...

Assign as follows

a=a+b-(b=a)

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is an INI file?

1596


write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?

2185


In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

1612


in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?

1650


1.what is the vesition managment.

1686






Write a program to create a process in UNIX

2091


is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...

1584


One boy has to climb steps. He can climb 1 or 2 steps at a time. Write a function that will returns number of way a boy can climb the steps. Int WaytoSteps(int n) (eg:- suppose number of steps is n=4 ,the function will return 5 (one-one-one-one ,one-one-two, one-two-one-,two-one-one, two-two)

3001


Is buffer size and file block size is similar? If similar,at which case it will be same size?

1738


Explain polymorphism. Provide an example.

618


why we need to take u?

1674


hi all, i need ur help in preparing a sql which performs scd2, i mean i have a scd2 mapping i need a sql which can give me same result as scd2 mapping, SRC table: cust_no, loc 01 abc 02 xyz TGT table: pm_ky cust_no loc current_flag 1 01 abc Y 2 02 xyz Y cust 1 has changed his loc to xyz then it loads into TGT table as below, pm_ky cust_no loc current_flag 1 01 abc N 2 02 xyz Y 3 01 xyz Y i need sql to get the above result, hope got me question, Any suggestion will be appreciate.. thanks, Vinod

1647


Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.

558


hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced

1563


EXPLAIN UNARY OPEARATORS

1804