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

wat are views in qtp explain

3 Answers   IGT,


Tell me the difference between QTP9.2, QTP9.5 and QTP10.0

1 Answers   Genpact, HSBC,


How to find a window is minimized or not

0 Answers  


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

0 Answers  


How to find Operating system information using QTP script?

0 Answers  






WHO IS THE BEST FACULTY FOR QTP IN HYDERABAD? A) NAGESHWAR RAO- MINDQ B) SURESH REDDY -SMART SOLUTIONS C) SURESH BABU- Q EDGE D) VENKAT - LIVE TECH E) GC.REDDY - HI-TECH CITY F) NONE OR OTHERS

7 Answers  


What are the two types of repositories available, explain them?

0 Answers  


Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?

0 Answers  


What are the Test design techniques you uses in ur project?

0 Answers   Accenture,


How to capture screen shots when an error occurs?

5 Answers   EDS,


Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan

0 Answers  


What is the difference in between function and sub as well as give some code of both

1 Answers   Wipro,


Categories