Class 6 : CHAPTER 11. QBASIC STATEMENTS

Descriptive Type Questions

1. What is the use of INPUT statement? What does a computer do when we use INPUT statement ?

Ans. The INPUT statement in QBasic is used to accept the data item from the user and store it in a variable. When the computer executes the INPUT statement, it displays a question mark asking the user to enter the required values.

2. What is the use of PRINT statement using TAB function ?

Ans. The PRINT statement with TAB function is used print tabular type of results. It prints the values at a particular column position.

For eg : PRINT TAB(18) ; “ GOOD EVENING “ prints the text “GOOD EVENING “ at the 18th Column position in screen.

3. Differentiate the use of PRINT statement with comma and semicolon by using examples.

PRINT with Comma PRINT with Semicolon
It displays the values one after another with plenty of spaces in between. In case there are more than 5 values , it prints the remaining values on the next line. It displays the values one after another without any space in between.

4. Define the conditional statement IF-THEN-ELSE.

Ans. IF-THEN-ELSE is a conditional decision making statement . If the condition given after IF is True , the statement(s) specified after THEN is executed. But if the condition is False, the statement(s) after ELSE is processed.

Syntax : IF (condition) THEN <statement 1> ELSE <statement 2>

5. What is the use of GOTO statement? Explain with example.

Ans. GOTO statement is used to transfer the program control from one statement to another unconditionally.

Syntax : [ Line No. ] GOTO < Line No. >

Leave a comment