how to reverse a string with out using string or predefined
function,ex:string is " i love india". the output should be
like this "i evol aidni"

Answers were Sorted based on User's Feedback



how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / mogal

str=" i love india"

StrSpl = Split(str," ")

For j = 0 to Ubound(StrSpl)

result1 = result1 & " " & ReverseStr1(StrSpl(j))
Next

msgbox result1

Function ReverseStr1(Str1)
For i = 1 to Len(Str1)
ReverseStr1 = mid(Str1,i,1) & ReverseStr1
Next
End Function

Is This Answer Correct ?    1 Yes 0 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / lak

str=" i love india"

Set regExpObj=new RegExp
regExpObj.pattern="[a-z A-Z]"
regExpObj.global=true

Set matches=regExpObj.execute(str)
For each letter in matches
result=letter.value&result
Next

msgbox result

Is This Answer Correct ?    0 Yes 1 No

how to reverse a string with out using string or predefined function,ex:string is " i love ind..

Answer / siva

You can use StrReverse syntax

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

tell me abt a time when u had to go above &beyind the call of duty to get the job done

0 Answers  


Hoe can we do retesting using functions please give the code for it using login page

0 Answers  


i m tryed to use qtp in a user registration form but at the "image enter"part it gives a error when i run the qtp bcz the image is changed every time so it gives a error when i use regukar expreesion fot this it still gives a error value bcoz it reads the image code bt nt reconige the image which i enter in the image verification text box.so hw can i automate qtp for this function.plz give me a answer

1 Answers  


Explain QTP testing process?

1 Answers   Crea,


Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)

0 Answers   IBM,


How comfortable are you in VB scripting?

2 Answers  


give the code to count child objects (Total) in the page

1 Answers  


is it possible to add sheets to excel at runtime

1 Answers  


How to handle the exceptions using recovery scenario manager in QTP?

0 Answers   Crea, CTS,


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

0 Answers  


What is the use of breakpoint in qtp?

4 Answers   Zensar,


How to find operating system information using the qtp script?

0 Answers  


Categories