How to swap two numbers by using parameter passing method
byref in a fucntion and return the result to outside of the
function?



How to swap two numbers by using parameter passing method byref in a fucntion and return the resu..

Answer / aqueeb khan lodi

call swap ("AQUEEB")
msgbox Environment("num")
Sub swap(str1)
var1 =len( str1)

For i = 1 To var1 Step 1
var2 = right(str1, 1)
var3 = left(str1,(var1 - i))
var4 = var4& " " &var2
str1 = var3
Next
Environment("num") = var4
End Sub

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi im new in Testing..can any one plz re-write this code SystemUtil.Run "C:\Program Files\Mozilla Firefox\firefox.exe","","C:\Program Files\Mozilla Firefox","open" ----using for loop(for i=0;i<=10;i++ )

2 Answers  


QTP script is not working on other's machine..

0 Answers  


i want to handle all the unwanted pop up through QTP i done that with recovery scenario but it need some title of pop up but i want that it should handle all the pop up even i don't give the title of that pop up in recovery scenario is there any general way to handle all the pop up please help

3 Answers  


How will u test content of an web application with out using chechpoints in QTP 9.2?

3 Answers   CTS,


What is load testing?

1 Answers   Crea,


What is the Difference between current version of QTP and QTP 8.2. Pls kidly Anybody let me know. Thanks in advance.

1 Answers   TCS,


In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples?

2 Answers   TCS,


write a script to verify the image path(src property) of the images which are in web pages.(do it by Descriptive method by creating a description object)

1 Answers  


what is Compile Module in QTP? what exactly it contains Functions or Actions?

1 Answers  


What are the versions of qtp,What are the differences b/n them?

1 Answers   TCS,


what is spy, and how can u use?

1 Answers  


When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?

4 Answers   BirlaSoft,


Categories