reverse the string without using reverse string?

Answers were Sorted based on User's Feedback



reverse the string without using reverse string?..

Answer / cnu_thatavarthi

Option Explicit
Dim strValue,iCount, strNewValue

strValue = "CapGemini"

For iCount = Len(strValue) To 1 Step -1

strNewValue = strNewValue& Mid(strValue,iCount,1)

Next

strNewValue = Trim(strNewValue)
MsgBox strNewValue

'Expected value
---------------------------

---------------------------
inimeGpaC
---------------------------
OK
---------------------------

Is This Answer Correct ?    0 Yes 0 No

reverse the string without using reverse string?..

Answer / rajani_kanth

Option Explicit
Dim a,c,d,i
a="RajaniKanth"
For i=Len(a) To 1 Step-1
c=Mid(a,i,1)
d=d&c
Next
MsgBox d

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

Why is it recommended to close the database connection every time after the work is completed?

1 Answers  


How do you get the value of a combo box in Javascript?

2 Answers   Aspire,


Mention the rules for using option explicit statement?

1 Answers  


how to write vb script code for login gmail page by using notepad and how to run script in notepad

1 Answers  


Mention what is variant in vbscript?

1 Answers  


Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...

1 Answers  


what is the differenece btwn scripting language and programming language

4 Answers  


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

1 Answers  


How to check the particular window is exist or not with out using check points

2 Answers  


How to open excel in vb script?

1 Answers  


What is the difference between VBScript and JavaScript?

1 Answers  


accept a string & display whether a is present or not

1 Answers  


Categories