write the code to reverse a string without using Strrev
built in function.
Answers were Sorted based on User's Feedback
Answer / fatekiller
code to reverse a string
first i wrote a function and then called that function to
reverse a string.
mystr=inputbox("enter the string")
ms=revstr(mystr)
print(ms)
Function revstr(mystr)
L=len(mystr)
revstrr=""
For i=0 to L-1
c=mid(mystr,L-i,1)
revstrr=revstrr&c
Next
revstr=revstrr
End Function
This program is written using the concept of MID function.
Is This Answer Correct ? | 4 Yes | 5 No |
Answer / m.bindu kumar
'Code to reverse a string without using strrev using
functions
Function stringreverse(a)
strlen=len(a)
For i = strlen to 1 step -1
strrev=mid(a,i,1)
stn=stn+strrev
Next
msgbox stn
End function
Dim strrev,strlen, strname,stn
a=inputbox ("enter the string to reverse")
stringreverse(a)
Is This Answer Correct ? | 3 Yes | 6 No |
Answer / ram
x="abcdefg"
v= len(x)
For i=1 to len(x)
newstr=mid(x, v,1)
a=a&newstr
v=v-1
Next
msgbox a
Is This Answer Correct ? | 2 Yes | 5 No |
Count the number of radio buttons and randomly select one.
What do you do if QTP doesn't recognize object ,what action should be taken
Why use Regular Expressions?
How many ways we can parameterize data in QTP?
how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.
can any one tell me how to select some text.i need the script for that
hi, for QTP TRAINING......SURESH REDDY SMART SOLUTIONS sr.nagar IS BEST OR NOT? how faculty teaches?
How can you capture(Read) the values from a Table?
What kind of errors can b handled in QTP in real time scenario?
what is the difference between window command and dialog command
there is 3 flash player buttons does QTP identify them or not else we have to do install anything related that software if we have to install what is that software and how we install it into QTP8.2 GIVE ME EXCAT ANSWER IF U KNOW.
When I used random numbers(1 to 9) with regular expression and run the test, it runs only 5 iterations with passed result instead of running all 1 to 9. Please tell me what can be the reason