Reverse a string keeping the words in the string as it is.
E.G. "Quick Test Professional"
O/P "Professional Test Quick"

Answers were Sorted based on User's Feedback



Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional"..

Answer / abbas

Var1="Quick Test Professional" 'Store String In One Variable

Arr=Split(Var1, " ") 'Split String By Space

For i=UBound(Arr) To 0 Step -1 'Run A Loop
Var2=Var2 &Arr(i) &Space(2)
Next

Msgbox Var2

Is This Answer Correct ?    12 Yes 0 No

Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional"..

Answer / manjunathareddy

Dim str
str=CStr(InputBox("Enter the String here"))
Arr=Split(str," ")
For i=UBound(Arr) to 0 Step - 1
var=var&Arr(i)&Space(2)
Next
Msgbox var

=====================OR======================
Dim str
str=Cstr(InputBox("Eneter the String here"))
a=Split(str," ")

Arr=Array(a)
Msgbox a(2)&" "&a(1)&" "&a(0)

Is This Answer Correct ?    4 Yes 0 No

Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional"..

Answer / guest

str="Quick Test Professional"
split_str=split (str," ")
For i = ubound(split_str) To 0 step-1
Print split_str(i)
Next

Is This Answer Correct ?    1 Yes 0 No

Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional"..

Answer / pravati

x="Quick Test Professional"
y=split(x," ")
msgbox ubound(y)
for i=ubound(y) to 0 step -1
msgbox y(i)
next

Is This Answer Correct ?    0 Yes 0 No

Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional"..

Answer / lak

dim str,strCnt ,revstr
str = InputBox("Enter your required String")

strCnt = len(str)

for i=1 to strCnt
revstr = mid(str,i,1)
Next

msgbox revstr

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More QTP Interview Questions

What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

0 Answers  


Why QTP is termed as a Record and Playback tool?

1 Answers  


who is the best faculty in HYD? Nageshwar rao or GC reddy?

3 Answers  


types of output value in details.

4 Answers  


QTP Query: Hello to all, I'm getting an error (as below) when I perform descriptive programming on any Web application. "The test run cannot continue due to an unrecoverable error.The "myvar_0" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object " But I do not have any problem when I perform the same descriptive programming on a Windows application such as Sample Application - Flight. Previosly , I had prepared a lot of scripts - both via creating the properties collection object and by giving the description in string arguments and implemented them on Flight and they're working perfectly fine.I'm using QTP Version 9.2 The sample script I have used for Web application is as below : Set myvar_0 = Description.Create 'Setting property collection object for Browser myvar_0("class").value = "Browser" myvar_0("name").value= ".*" 'Setting property collection object for Page Set myvar_1 = Description.Create myvar_1("class").value = "Page" myvar_1("name").value= ".*" 'Setting property collection object for Text box Set myvar_2 = Description.Create myvar_2("class").value = "WebEdit" myvar_2("name").value= ".*" 'Setting property collection object for Button Set myvar_3 = Description.Create myvar_3("class").value = "WebButton" myvar_2("name").value= ".*" SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe" Browser("myvar_0").Page("myvar_1").WebEdit("myvar_2").Set ("hello how are you ?") Browser("myvar_0").Page("myvar_1").WebButton ("myvar_3").Click Browser("myvar_0").Page("myvar_1").Sync Browser("myvar_0").Close As our application is a Web based application, I was planning to make a few changes in regards to the object names, but unfortunately I am getting the above mentioned error. Could anyone please advice me, whether it could anything to do with the run setting or anything else.I am getting the same error even while implementing on our Sample Application - Mercury Tours website. I would be grateful to anybody who can solve my problem !!

1 Answers  






Which functionalities of QTP used in banking project? pls any say answer?

0 Answers  


Explain synchronization types in QTP

2 Answers  


will QTP 9.2 run successfully on Linux(gui) operating system

1 Answers  


Write the Test Cases for ATM(Any Time Money)

3 Answers   SpaceLabs,


HOW TO DO THE BATCH TESTING USING QTP?

8 Answers   CTS,


1.what is the difference between childobjects and child items in qtp? 2.what is difference between a class and function? 3.can u convert ustimings to indian timings using vbscript? 4.i have scripts in one machine.can i run those scripts in another machine.how?

2 Answers   Genpact, Infosys, Symantic Space, TCS,


any one can explain about QTP proocess,means where to start and how to start Scripting.

3 Answers  


Categories