How to swap values between two variables without using a
third variable?
Answer Posted / pushpendra
int x=10,y=20;
x=x+y (10+20=30)
y=x-y (30-20=10)
x=x-y (30-10=20)
x=20,y=10
x and y vales are swaped.
| Is This Answer Correct ? | 13 Yes | 9 No |
Post New Answer View All Answers
Difference between HTML and DHTML?
what is the software to run the GSM gate opener program
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
Explain three modes in which files can be accessed from python program
how do i add a column dynamically in a table by using java application?
can we extend a class having only one parameterised constructor.Suggest the process to do it.
what is c sharp dotnet
Have you used callsymputx? what points need to be kept in mind when using it?
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
< DL Compact > tag is used for
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?
Delta 5 weight scale not connect with oracle application what i can do?
Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?
What is autocall macro and how to create autocall macro? what is the use of it?