Posts

Variable and Types With Example

Variables:- Variable refers to a storage area whose contents can vary during processing. All the variables are created in the memory of the computer. The data store can change during the execution of the programs. The variables name have the following properties:- i) Any variables name may be up to 40 character long ii) Can’t contain characters other than letter, number and types of declaration character ($, %, #, & and ?) iii) Variable name must began with a letter (A-Z a-z (i.e. lowercase or uppercase letter).) iv) Can’t be reserved word like INPUT, v) Variable name represent either numeric values or strings. vi) Can’t began with “FN” unless it is a function call. Types of Variable a) Numeric Variable b) String Variable a) Numeric variable:- Numeric Variables can be any single letter of alphabetic followed by one of the numerals.  Example:-  A=12  pi=3.14  c=79.89 b) String Variable:- String Variables had the string of character or alp...

Expression Types and operators with Example

Image
Expression and Operator Expression is a programming language statements that has a value. Usually an expression consists of an operator and each operands.  Operator performs mathematical or logical operations on value QBASIC supports following types of operators. Types of Operators:- a) Arithmetic operator b) Relational Operators c) Logical Operators d) String Operators a) Arithmatic Operators:- Arithmetic operator are used for various mathematical calculation . Arithmetic operators performed such as addition, subtraction, multiplication, division and exponentiation. A numeric expression is any collection of operators and operands. a) The following are the arithmetic operator used in QBASIC:-- Operators Operations Example ^ Exponential A^B - Negation -B * Multiplication A*B / Floating point division A/B \ integer division A\B MOD Modular Division A MOD B + Addition A+B - Subtraction A-B Example Code:- Example Output:- b) Relational O...

KeyWord With Example

Keyword:- Keywords are specific words that are reserved as programming language commands. This words may only be used for their intended purpose some of the keywords of QBASIC programming are REM, INPUT, PRINT etc. Most of the keyword a automatically displayed in the Uppercase (i.e A-Z) by QBASIC.

Syntax With Example

Image
Syntax:- Syntax is a set of rules that must be followed when constructing a program. Syntax tell us how keywords and operators may be used. Forgetting a space or a small spelling mistake will make the Qbasic to produce “syntax Error” message and step program execution.  Following Image is a example of syntax Error When sysntax error occure in qb64 

Qbasic Part-I Questions

QBASIC PART-I Questions  (click on the questions for the answers) 1. Define QBASIC. List two elements of QBASIC 2. What is character Set? Give two examples. 3. Define Variable. List two properties of variable . 4. Define Variable. Give two examples. 5. What is syntax? 6. Define Keyword? Give two examples. 7. Define operator and operand. 8. Define arithmetic operator with two examples. 9. Define relation operator with two examples. 10. Define Logical operator with two types. 11. What is a string operator? Write operator symbol for the string operator 12. List two rules of logical operator.