difference between do while and do until ?

Answers were Sorted based on User's Feedback



difference between do while and do until ?..

Answer / bhargavi

In both Do-until and Do-While,Code will be executed atleast once.
But,the difference is Do-until executes the code until the specified condition is reached.Once the condition is reached it stops executing the code inside the loop.

Do-While will execute the code till the specified condition is true. once the condition becomes false,it exits from loop.

Is This Answer Correct ?    2 Yes 0 No

difference between do while and do until ?..

Answer / viji

Do until will execute once when the condition is false whereas do while will execute only when condition is true

Is This Answer Correct ?    1 Yes 1 No

difference between do while and do until ?..

Answer / sarabjit

In do until , the code is run atleast once
eg: do
{
/// statement
} until i=0

whereas in while it checks whether condition is false/true , and then it executes the statement
while i=0 ******if i=0 is true*****
{
execute the statement
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

What is keyword driven testing..what is the use of this in Automated testing

2 Answers   IBM,


please give me the code for doing retesting of gmail login page using functions so the function has to give the value

0 Answers  


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

0 Answers  


Hi guys i'm prepareing for interview question for qtp i don't have bayground for vb scipt language can any one tell me it is easy to do job in qtp without bayground.

3 Answers  


I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab1"" value=""Save"" type=""button"">", Second button "html id:=btnSave "outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"">", Third button "html id:=", outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab Fourth button "html id:=btnSave outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"" 5th button "html id:=", "outerhtml:=<input class=""Button"" onclick=""document.getElementById('a5').click();"" value=""Save"" type=""button"">",

0 Answers  






What is contained in the object repository?

0 Answers  


Explain key word driven frame work?How to use in real time?

2 Answers   HP,


How can we log a defect in Testdirector from Q.T.P ?

2 Answers   EDS,


Hi,i have 3 years of experience in manual and Automation qtp.present i am searching for job in automation qtp 2Yrs,How to Explain the interviwer Roles and Responsibilites.please help me.

1 Answers  


If u prepare bug report in Excel sheet . Is it possible to send thrw Test director? how it is?

3 Answers   Wipro,


how to write xml output check point bu useing descriptive programing .means without useing output check point

0 Answers  


Hi I am new to QTP. we are planning to implement automation for the application. I am trying to execute the following script: Set ExcelObj=CreateObject ("Excel.Application") ExcelObj.WorkBooks.Add Set NewSheet=ExcelObj.Sheets.Item(1) NewSheet.Name="Order" ExcelObj.Cells(1, 1).Value = "Name" ExcelObj.Cells(1, 2).Value = "Ordernum" ExcelObj.Cells(2, 1).Value = "nam" ExcelObj.Cells(2, 2).Value = "21" ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls" ExcelObj.Quit Set ExcelObj = Nothing in the above script for the line(ExcelObj.Cells(2, 2).Value = "21") it is inserting the value 21 successfully.this is fine But if i want to insert a variable instead of the constant value then what should be the modification in the script. For example: If user retrives a value throug "GetRoProperty" and wants to insert the value into then how the script changes?

1 Answers  


Categories