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

When Recovery scenario actually starts while testing the application?

0 Answers   SAP Labs,


What are the differences between qtp and winrunner?

0 Answers  


What are the properties you would use for identifying a browser and page when using descriptive programming?

0 Answers  


What is User defined function in QTP

6 Answers   Bank Of America,


Write script to fetch the data from global sheet where row number is 3 and parameter is "text"

3 Answers   Accenture, Thomson Reuters,






How to connect to a database?

0 Answers  


How can i open 5 multiple browser at once through QTP VB script

4 Answers  


Explain the checkpoint in qtp?

0 Answers  


hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus

1 Answers  


waht is the diff b/w Environment variable and Global variable in qtp?? explain types of variable in qtp??

5 Answers  


What is clean sweep?

0 Answers  


How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)

0 Answers   TCS,


Categories