A variable is a memory space where we can store values. Variable names that we use in QBasic can be a single letter or a complete name. It is recommended if the programmer can use the variable based on the program that they are working on. It will actually give the user the proper readability to understand what the program is about.
Some rules need to be followed by the user while they work on creating new variables in their program:-
- The first character of the variable name should always start with a letter.
- Variable names can't start with a number.
- A string variable in QBasic must end with a dollar symbol.
- The maximum length of any variable name in QBasic is about 40 characters.