There is a name "AJAY" how do u count no.of. "A" in that
name ?

Answers were Sorted based on User's Feedback



There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / ravi

res=split("AJAY","A")
msgbox "No. of A's " & ubound(res)

Is This Answer Correct ?    9 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / swarna

Dim txt, cnt
txt="ajay"
p=split(txt,"a")
cnt=0

for i=1 to ubound(p)
cnt=cnt+1
next

b=cnt
msgbox cnt

Is This Answer Correct ?    5 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / nayana

Dim str

str="ajay"
b=len(str)

for i=1 to b
c=mid(str,i,1)
if c="a" then

d=d+1




end if
next
msgbox d

Is This Answer Correct ?    0 Yes 0 No

There is a name "AJAY" how do u count no.of. "A" in that name ?..

Answer / sid

Hello All
There is another way of doing this

x="AJAY"
if instr(x,"A")<>0 then
msgbox x
end if

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More QTP Interview Questions

To which environments does quicktest professional supports?

0 Answers  


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

0 Answers   Value Labs,


What are the major/ important methods, functions in QTP we use realtime testing

0 Answers  


Where the text version of script file located in file system?

1 Answers  


When we parameterise some field ex. Textbox is there any way that we can generate a specefic number of random values (For alphabetical values if possible) instead of manually entering values in the data table

2 Answers  






Is there any thing that we can replace recovery scenario manager in QTP.

3 Answers  


What is the exact difference bet function and action in QTP Anybody can explain it in detail..Thanks in advance..

12 Answers   Wipro,


What is chaild object method? When we will go for chaild object method? How to use chaild object method?

2 Answers  


A question was asked in a company-suppose, I am testing a website on QTP, all the time a new title bar is appeared on next page. Trying to use regular expression under key word driven testing but expert view is also appearing unchanged and error is also generating, do you have any best resolution for that kindly explain in detail. please dont give example of yahoomail, that is unable to clear my doubt.

2 Answers  


How do u do batch testing in WR & is it possible to do in QTP, if so explain?

4 Answers  


can we test an windows application using qtp

1 Answers  


why we use environment variables

5 Answers  


Categories