X=10,Y=20 you need to swap the numbers without using a
third variable?

Answer Posted / ramyashetty

'a and b are two variables ; Following code swaps both number and string inputs

a = Inputbox("Enter a")
b = Inputbox("Enter b")


a = a + b

b = left(a,(instr(a,b)-1))
a = Right(a,(len(a)-len(b)))

msgbox "b ="&b
msgbox "a = "&a

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When and why to use descriptive programming?

794


I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?

1997


What is the use of sendkeys and what are send keys

2193


How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?

4037


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2260


Where to use Property Let, Property Get, Property Set in UFT

592


Differences between quicktest professional (qtp) and winrunner?

888


Should have experience in framework means?

1628


is it possible to add sheets to excel at runtime

3603


Explain hybrid framework with advantages and disadvantages?

765


Explain about Test Fusion Report of QTP?

817


What is checkpoints for quicktest professional?

773


Suppose I want fail that check point? How can you do that?

849


What is the use of running the scripts in Hidden-mode in UFT?

930


how to do the batch testing in test director using manual testing procedure?

2015