Subject: Computer
To construct the QBASIC program, we have to arrange some standard elements.The elements used in Qbasic are as follows:
QBASIC has the character set consisting of the following elements:
The symbol ^ (caret) is used to denote exponentiation operator, the symbol * (asterisk) is used to denote multiplication and other symbols; have their usual meanings.
A quantity in a computer program which does not change its value during the execution of the program is called a constant. QBASIC allows the following constants:
The numeric constant is one that is formed by a sequence of digits 0, 1, 2,.....9 and may include a decimal point. A numeric constant may be an integer or a real number. 383, +57, 0, -6.2 and 6.15E4 are valid numeric constants. The number 6.15E4, in fact, represent 6.15 * 104. The notation E is used to represent the exponential form. The number after E is the exponent which can be positive or negative. However, its length cannot exceed two digits.
It is also important to keep in mind that:
A string constant consists of a sequence of characters which must be enclosed by a quotation mark.
The quantity which may change its values during the execution of the program is called the variable.
In QBASIC, variables are also of two types:
A quantity in a computer program which does not change its value during the execution of the program is called a constant and the quantity which may change its values during the execution of the program is called variable. QBASIC allows the following constants:
Numeric constant is one that is formed by a sequence of digits 0, 1, 2,.....9 and may include a decimal point. A numeric constant known as number may be integer or a real number. 383, +57, 0, -6.2 and 6.15E4 are valid numeric constants. The number 6.15E4, in fact represent 6.15 * 104. The notation E is used to represent exponential form. The number after E is the exponent which can be positive or negative. However, its length cannot exceed two digits.
How many types of the variable is in QBASIC? Describe any one of it.
In QBASIC, variables are also of two types:
Numeric variable
Numeric variable can assume numeric value and is represented by an alphabet or an alphabet followed by another alphabet or digit. For example A, C, A2, ABC, A6 etc. represent numeric variables. A string variable is represented by an alphabet followed by dollar ($) sign. It should be kept in mind that while constructing the string variable, dollar ($) should be the last character. For example: B1$, NAME$, BOOK1$, etc are valid string variables.
List the elements used in Qbasic.
The elements used in Qbasic are as follows:
What do you mean by a statement in Qbasic?
A statement is a set of instructions written using keywords or commands of QBASIC.
What are operators?
Operators are the symbols, which are used in arithmetic operations, logical expressions and string expressions.
What are operands?
Operands are the data or variables on which mathematical, logical and string operations take place.
© 2019-20 Kullabs. All Rights Reserved.