str="QTP AUTOMATION TESTING"
here how many T are there in the str
finally i want to display the T

Answers were Sorted based on User's Feedback



str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / abin

str="QTP AUTOMATION TESTING"
a= ubound(split(str,"T"))
msgbox a

Is This Answer Correct ?    10 Yes 1 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / karthik

i am thinking this will correct ...because he want to count
how many T are there ,for that it's correct..
and finally he want to display the T ,just read the question
once again ...if i wrong let me know...

str="QTP AUTOMATION TESTING"
dim l,m,n,p
l=len(str)
for i=1 to l
m=mid(str,i,1)
if m="T" then
n=n & m
end if
next
p=len(n)
msgbox P
msgbox n

Is This Answer Correct ?    9 Yes 2 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / gabbar

msgbox len(str)-len(REPLACE(str,"T",""))

Is This Answer Correct ?    4 Yes 1 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / ganesh

excellent answer by gabbar..out put 5 came

but question is not over ..finally display T ?

what about T.........

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / prashaant kumar

str="QTP AUTOMATION TESTING"
a= split(str,"T")
msgbox ubound(a)
msgbox string(ubound(a),"T")

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / lak

Karthik is correct

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / pravati

x="qtp automation testingttt"
y=split(x,"t")
for i=0 to ubound(y)
msgbox ubound y(i)
next

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / cnu_thatavarthi

Dim strValue,i, blnFlag,incRement

strValue = "QTP AUTOMATION TESTING"
blnFlag = ""
incRement = 0
For i = 1 to Len(strValue)
If Ucase(mid(strValue,i,1)) = "T" Then
incRement = incRement+1
blnFlag = blnFlag &Ucase(mid(strValue,i,1))
End If
Next
Msgbox incRement 'Number of Ts are Displaying 5
Msgbox blnFlag

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / manjesh

a="QTP AUTOMATION TESTING"
b=split(a,"T")
c=Ubound(b)
msgbox c

Is This Answer Correct ?    0 Yes 0 No

str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to disp..

Answer / jay patel

dim str
str = "qtp automation testingttt"
a = split (str,"t")
for each x in a
msgbox x
next
msgbox ubound(a)

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More QTP Interview Questions

I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp

2 Answers  


Difference between test object and run time object?

0 Answers  


I have an application running in Linux server. I am reaching the application through emulators like telnet. My operating system at the client side is Windows XP. Using emulator I am connecting the Linux server and working on the application. Can I automate the testing of the software running in Linux server using QTP. In short, does QTP support the applications running in Linux servers.

1 Answers  


How we know the qtp has used the smart identification process for identification of the object.

4 Answers   IBM,


Wht are the BY default Add-ins in QTP 9.2 version and what all are differences between 8.2 and 9.2

2 Answers   Siemens,






What is the use of breakpoint in qtp?

4 Answers   Zensar,


i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages

4 Answers   Accenture,


How comfortable are you in VB scripting?

2 Answers  


what kind of frame work you used in your last project?

0 Answers   Deloitte,


how to find that tools work well with ur existing system?

0 Answers  


Can we Script any test case with out having Object repository? or Using Object Repository is a must

3 Answers   Crea,


Explain about random testing of 500 test cases?

1 Answers   IBM,


Categories