VB.NET Questions Answers- VB.NET loops (PartI)


VB.NET loops (PartI)

1. The purpose of using a loop is to
a. Repeat operation(s) many times       b. make decision Check answer 2. Which of the VB.NET loops is not a pretest loop?
a. for loop   b. while loop   c. do while loop Check answer 3. The Exit command is used to exit a loop in VB.NET language.
a. True   b. False Check answer 4. Which of the followings is not a nested loop?
a. for i=0 to 9
        for j=1 to i+3
        Next
    Next
b. for i=0 to 9
       Console.Write("i={0}",i)
    Next
    for j=1 to i+3
       Console.Write("j={0}",j)
    Next
c. for i=0 to 9
        while(j Mod 2<>0)
             Console.Write("{0}", j & vbTab)
              j+=1
        End While
    Next Check answer 5. Which of the following statements about the while loop is not true?
a. The while loop is a posttest loop.
b. Testing condition is made before each iteration.
c. The while loop statement must terminate with a semi-colon.
Check answer


Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.