Class 10 Computer Science Note
REVIEW OF CONTROL STRUCTURE
Control flow structure and basic control structure of QBASIC
Control flow structure is instructions, statements or group of statements in a programming language which determines the sequence of execution of other instructions or statements.
The basic control structures of QBASIC are as follows:
I. Sequential Structure II. Loop Structure III. Selection Structure
loop structure and it's importance of loop in programming
A loop structure is a logic, which is used to execute one or more than one statement for a number of times.
Loop in a program allows for repeated iteration over the same set of instructions. Depending on the type of loop and the constraints will depend on how many times those instruction get repeated.
Never terminating loop is called Infinite loop. Pressing "Ctrl + Break" or "Ctrl + C" keys breaks the infinite loop.
Counter or control variable
Counter is a program which is used when one needs to count how many times a program executes a loop.