Write a program to print all lines that contains a word either “testing” or “qtp”
Answer Posted / syamala usha
set fso = createobject("scripting.filesystemobject")
set f=fso.opentextfile("C:
otes HP.txt",1)
Do until f.atendofstream
str=f.readline
a = split(str," ")
flag=0
for j = 0 to ubound(a)
if (a(j) = "testing") or (a(j) = "qtp") then
flag=1
exit for
end if
next
if flag=1 then
msgbox str
end if
loop
f.close
set f= nothing
set fso =nothing
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
Explain the .wsf files?
In what way program "hello world" you can write in vbscript?
What is the purpose of regexp object in vbscript?
How to get the length of the string by making use of the string function?
How can you create a file object to work with the files in the vbscript language?
What are the valid scopes of a variable in vbscript?
Illustrate briefly about the different types of statement
Explain the functionality of vbscript?
What are the naming conventions while declaring a variable in the vbscript language?
how to automatically update the sql server2005 database records when insert in vb6?
Explain the scope of the variables using dim, public, and private keywords respectively.
What is the scope of a constant declared using public?
Mention how to assign a date value to a variable?
What is the difference between do until loop and do while loop?