0% found this document useful (0 votes)
41 views5 pages

QBasic Programming Elements Explained

A QBasic program consists of elements such as a character set, constants, variables, statements, and operators. Constants are fixed values, categorized into numeric and string constants, while variables are memory locations for temporary data storage, classified into numeric and string variables. Operators indicate the type of operations performed on data, with QBasic supporting mathematical operators like addition, subtraction, multiplication, and division.

Uploaded by

AAYUSH GAMER
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views5 pages

QBasic Programming Elements Explained

A QBasic program consists of elements such as a character set, constants, variables, statements, and operators. Constants are fixed values, categorized into numeric and string constants, while variables are memory locations for temporary data storage, classified into numeric and string variables. Operators indicate the type of operations performed on data, with QBasic supporting mathematical operators like addition, subtraction, multiplication, and division.

Uploaded by

AAYUSH GAMER
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A q- basic program consists of various elements .

The are :-
A Character set
Constants
Variables
Statements
Operators and expressions .
Character set :-
With respect to computer lessons . The q basic character set
consists of :-
 Alphabets from A – Z and a-z
 Numbers from 0 – 9 and
 Special character + , - , * , < , > , = , ’ , ” , / , ^ , # , $ , % , , etc .
Constants :-
A constant is the fixed value which is used in the program . They
are two type :-

102 . Numeric constants : Numeric constants is a numeric value


which is used in a program .
For example :- 104 , 102.50 , 710456 etc .

103 . String constants : String constant is a sequence of character


which is used in a program . It is the collection of numbers or texts
or a combination of both text and numbers .
From example : - “Hello”, Computer “ , etc .
Variable
A variable is a location in the memory , which has been assigned a
name , and it used to store data temporarily . It holds the value
until another value is assigned to it .

There are two types of variable :-

1. Numeric Variable :- It can hold only Numeric value , for


Example :- A , B , A1 , ABC , _ 4 etc .
2. String Variable :- It is represented by an alphabet followed by
the dollar ($) Sign . IT contains letters , digits , Underscore but
the last character is always a $ .
For Example :- B3$ , OP1$ etc .
Operators :-
Operators are the symbol that indicate the type of operation . Q
basic has to perform on the data or on the values of variables .

There are three types of operators in Q basic . They are :-

Mathematical operators :- The table contains the types of


mathematical operators available in Q basic .
Operator Meaning
+ Addition or unary plus
- Subtraction or unary Minus
* Multiplication
/ Division
% Modulo Division

You might also like