A few questions for those knowledgeable in VB.net - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

A few questions for those knowledgeable in VB.net

dkongzoomdkongzoom Posts: 1Member
Hello, I just have a couple questions regarding VisualBasic.net. We have a practice test and I cannot seem to locate these answers. If anyone could help me, I'd greatly appreciate it! Thanks!

1) The Do-While structure is terminated with keyword 'Loop'?
TRUE or FALSE?

2) You can use the Remove method to remove one or more characters from the beginning of a string.
TRUE or FALSE? (technically, this could be true because the Remove method can remove one or more characters from 'anywhere' in a string. However, if my professor is picky, he may want the "TrimStart" method because its exact definition is removing one or more characters from the beginning of a string.)

True & False can be very tricky!!

3) The body of a Do-While loop statement executes:
A) never
B) if its condition is false
C) if it is not an infinite loop
D) at least once

Comments

  • btsebbtseb Posts: 67Member
    : Hello, I just have a couple questions regarding VisualBasic.net. We have a practice test and I cannot seem to locate these answers. If anyone could help me, I'd greatly appreciate it! Thanks!
    :
    : 1) The Do-While structure is terminated with keyword 'Loop'?
    : TRUE or FALSE?
    :
    : 2) You can use the Remove method to remove one or more characters from the beginning of a string.
    : TRUE or FALSE? (technically, this could be true because the Remove method can remove one or more characters from 'anywhere' in a string. However, if my professor is picky, he may want the "TrimStart" method because its exact definition is removing one or more characters from the beginning of a string.)
    :
    : True & False can be very tricky!!
    :
    : 3) The body of a Do-While loop statement executes:
    : A) never
    : B) if its condition is false
    : C) if it is not an infinite loop
    : D) at least once
    :
    [red]**************************************************************[/red]
    [blue]1) The Do-While structure is terminated with keyword 'Loop'?
    [black][b]TRUE[/black][/b] or FALSE?


    2) You can use the Remove method to remove one or more characters from the beginning of a string.
    [black][b]TRUE[/black][/b] or FALSE? [black](It is preferred to use TrimStart)[/black]

    3) The body of a Do-While loop statement executes:
    A) never
    B) if its condition is false
    C) if it is not an infinite loop
    [black][b]D) at least once[/black][/b][/blue]



  • BarbaraOosBarbaraOos Posts: 5Member
    Question 1 & 2 is True

    Question 3 is (D), but only if the Do While loop is a posttest/bottom driven loop. If it's a pretest/top-driven loop, the condition is tested first. Therefore, it has to test true to enable the loop to execute.

    Posttest/bottom-driven loops will execute the code once and then only test the condition.

    Based on the choices you were given I am assuming that a posttest Do While loop refers.
Sign In or Register to comment.