How can we change(increase or decrease)the size of a array
variable with out loosing the previous values



How can we change(increase or decrease)the size of a array variable with out loosing the previous ..

Answer / pratap h s

Dim a(10) is array declared

if we want to change the size of array it should be
declared with redin as below

ReDim A(10)

to preserve the contents of array we need to use preerve
keyword as below

ReDim Preserve A(10)

above line is Answer ,,,, by declaring array as above it
will preserve the valus

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

What are the technics follow in writing VB script?

0 Answers   CTS,


In QTP how can we recognize objects Without using Object Repository?

3 Answers   IBM, Wipro,


what is the syntax for regular expression in QTP? how to create user defined functions in QTP?

6 Answers   CTS, MBT, TCS,


tell me abt a time when u had to go above &beyind the call of duty to get the job done

0 Answers  


How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..

0 Answers  






how to insert QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of executin due to an error (for object not found)?

1 Answers   Ordain Solutions,


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

0 Answers  


In Descriptive programing if i use this below code will it work for login window or flight Res Window. Shud i add the properties like attached text=login and text=Agent Name in the object repository and define a new object first. Pls tell me the procedure in clear inorder to execute this script. Dialog("title:=Login").WinEdit("attached text:=Agent Name:").set"agent123" Dialog("title:=Login").WinEdit("attached text:=Password:").set"mercury" Dialog("attached text:=Login").winbutton("text:=OK").click

2 Answers  


Explain about Standard output value, Text output value, database o/p value, Xml O/p value, Xm o/p Value

1 Answers   TCS,


i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??

2 Answers  


how to reverse a string with out using string or predefined function,ex:string is " i love india". the output should be like this "i evol aidni"

10 Answers   Aspire, MNC, Omega,


assume i have few url link how will i dynamically call then using descriptive programming?

0 Answers   BirlaSoft,


Categories