QBasic Loops


Available Answers

  1. 1.

    Explain, the concept of Counters and Accumulators.

  2. 2.

    Explain, FOR ... NEXT statement as a counter loop.

  3. 3.

    Explain, the nested loop concept with the help of an example.

  4. 4.

    Fill in the blanks.

    1. A ________________ variable is a type of integer, and is incremented every time, some specific condition occurs.
    2. The ________________ statement denotes the beginning, and the ________________ statement denotes the end of DO .... LOOP.
    3. ________________ and ________________ are variables in a program, serving specific purpose.
    4. When a loop is enclosed within another loop, then it is said to be ________________ loop.
    5. The ________________ ________________ statement allows a condition, other than the counter value to exit a FOR.... NEXT loop.
  5. 5.

    Write True or False.

    1. When working with nested loop, the outer loop changes only after the inner loop is completely finished.
    2. If the variable's start value is more than its adding value, use a positive STEP interval.
    3. DO....LOOP statements, are used in programs to repeat code or return to the start of a procedure.
    4. The accumulator initial value is normally, set to one.
    5. If a loop has no exit condition, it will never stop.
  6. 6.

    Multiple Choice Questions (MCQs).

    1. There are ________________ loop forming statements in QB64.
      1. one
      2. two
      3. three
    2. A ________________ variable stores, partial results of repeated additions to it.
      1. counter
      2. accumulator
      3. integer
    3. The ________________ condition continues the loop, until the condition becomes false.
      1. WHILE
      2. DO
      3. EXIT
    4. The ________________ statement is used, when we know, how many times the task is to be performed.
      1. EXIT
      2. LOOP
      3. FOR
    5. The ________________ , ________________ statement, is used to repeat a block of statements while a condition is met.
      1. WHILE, WEND
      2. EXIT, DO
      3. EXIT, FOR
27 more answer(s) available.

Please login to post your comments.