Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write the code to reverse a string without using Strrev
built in function.

Answers were Sorted based on User's Feedback



write the code to reverse a string without using Strrev built in function...

Answer / jay prakash

Try this:

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''Script Starts Here''''''''''''''''''''''''''

Dim i
Dim iStrLen
Dim strOut
Dim strTmp
Dim strMyString

strString=InputBox("Please enter the string to be
reversed:")
iStrLen = Len(strString)
For i = 0 To Len(strString) - 1
strOut = Mid(strString, iStrLen - i, 1)
strTmp = strTmp & strOut
Next

strMyString = strTmp
msgbox strMyString



''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''Script Ends Here''''''''''''''''''''''''''

Please let me know if it helps

Is This Answer Correct ?    32 Yes 5 No

write the code to reverse a string without using Strrev built in function...

Answer / bhaskar

Str = InputBox("Please enter the string to be reversed:")
Cnt = len(str)
For i = 1 to Cnt
Rstr = mid(str , i ,1) &Rstr
Next
Msgbox Rstr

Is This Answer Correct ?    15 Yes 8 No

write the code to reverse a string without using Strrev built in function...

Answer / uday

All the above answers uses one the other string functions
like mid, len, instr.

But we can reverse a string without using any string functions.

Looks interesting? Try the below code:

str="Hello Uday"

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

print result

Is This Answer Correct ?    7 Yes 0 No

write the code to reverse a string without using Strrev built in function...

Answer / logesh gunasekar

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char oldMsg[100], newMsg[100];
int cd = 12, cu = 0;
strcpy(newMsg, "Hello World!");
while (cd > 0)
{
newMsg[cu] = oldMsg[cd];
cu++;
cd--;
}
printf("%c", newMsg);
printf("\n\nPress ENTER to end . . .");
getchar();
return 0;
}

Is This Answer Correct ?    3 Yes 2 No

write the code to reverse a string without using Strrev built in function...

Answer / prasad

Option Explicit
Dim Str, Cnt , Rstr , i

Str = "Shiva"
Cnt = len(str)

For i = 1 to Cnt
Rstr = mid(str , i ,1) &Rstr
Next
Msgbox Rstr

Is This Answer Correct ?    11 Yes 11 No

write the code to reverse a string without using Strrev built in function...

Answer / prasd tl

Dim Str, Cnt , Rstr , i

Str = "Shiva"
Cnt = len(str)

For i = 1 to Cnt
Rstr = mid(str , i ,1) &Rstr
Next
Msgbox Rstr

Is This Answer Correct ?    2 Yes 2 No

write the code to reverse a string without using Strrev built in function...

Answer / chandrakanta

dim str,rs,i
str="chandrakanta panda"
rs=""
For i=0 to len(str)-1
rs=rs&mid(str,len(str)-i,1)
Next
print rs

Is This Answer Correct ?    2 Yes 2 No

write the code to reverse a string without using Strrev built in function...

Answer / rajesh kumar

can any one tel ;question is
a[1]=I
A[1]=N
A[1]=D
A[1]=I
A[1]=A
OUT PUT IS I NEED INDIA HOW WILL U DO THAT
USING A SIMPLE STRING
REPLY ME ITS NEED FUL.......

Is This Answer Correct ?    0 Yes 0 No

write the code to reverse a string without using Strrev built in function...

Answer / kondekar ashish k.

dim a, b as string
a=text1.text
b=strrev(a)
text2.text=b

Is This Answer Correct ?    0 Yes 0 No

write the code to reverse a string without using Strrev built in function...

Answer / prathyusha

without using built-in function we can go for RegExp.

str="Hello"
set oreg=new reg exp
oreg.global=true
oreg.ignorecase=true
oreg.pattern="[.]"
set omatches=oreg.execute("str")
for each match in omatches
res=match&vbcrlf&res
next
msgbox res

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Explain about Hybrid Framework

2 Answers   IBM,


I have to automate webpage. If I click one hyperlink2 it will take 2 hrs to open. How to automate hyperlink2?

4 Answers   Cap Gemini, Polaris,


w is output value

3 Answers   MBT,


I want to scroll down in MSPAINT (captured a screen already). So that I can read the data in it through the step Window(paint).GetVisibleText for my validation. Anyone know the scripting for this?

1 Answers   TCS,


tell me about regular expressions in QTP? where we use? give eample?

2 Answers   IBM,


when i add the items to the repositry, the item is loading is "winmenu", but wn i write the script the tool is not able to recognise the item, i know that we need to define the mandatory or assitive properties here, but i am confused wt i need to difine here and on wt basis i need to select the properties and define it, can any one help me out on this.

0 Answers  


what is defination of system testing?

3 Answers   CodeArrow, Infosys, Omax,


qtp script for recording and running the application.need script for short cut keys like f3,f4 etc.how to write script for recording?

2 Answers  


wt is the xtension of the QTP result view file?

4 Answers  


Explain the difference between smart identification and object identification withn clear example. please it is very urgent

2 Answers   Wipro,


hw to create a frame work in qtp..what are the basic steps

2 Answers   Infosys,


Dim ExcelSheet Set ExcelSheet = CreateObject("Excel.Application") excelsheet.application.visible = true ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1" ' Save the sheet. ExcelSheet.SaveAs "C:\DOCS\TEST.XLS" ' Close Excel with the Quit method on the Application object. ExcelSheet.Application.Quit after run this script i am getting error"The test cannot continue due to unrecoverable error"

3 Answers  


Categories