Site icon Pathshala Nepal

What are constants? Write different types of constants.

Qbasic
Online Calculator

What are constants? Write different types of constants.


1 Answer


A constant is a value that does not change during program execution.

Constant as the name states is the computer program whose quantity does not change its value during the execution of the program. A constant is something like a universal value like the value of Pi, value of G etc in science. In Q basic the constant is declared by using CONST keyword.

There are two types of constants, they are:

  1. Numeric constant 
  2. String constant
Topics from Computer
Related Questions