answersLogoWhite

0

QBasic

QBasic is an integrated development environment (IDE) and interpreter for a variant of the BASIC programming language. QBasic includes a debugger with code modification and on-the-fly expression evaluation that can run under most versions of DOS, Windows, Linux and FreeBSD.

221 Questions

What are the basic components of a program?

The main 2 components of any program in general are...

1> Program code (any programming language)

2> Data (numbers/text/graphics)

The programming language uses code to manipulate:

store/calculate/interrogate/display the data.

The data could, in fact, be located anywhere...

-inside of the program's own 'internal' structure such as:

data statements/array structure/variables list/-etc.

-or else, inside of an 'external' database file:

(.txt)/(.dat)/(.csv)/-etc.

What is the program to print odd number using for next loop in GE BASIC?

In GE BASIC, you can print odd numbers using a FOR-NEXT loop by specifying a starting point and incrementing by 2. Here’s a simple example:

FOR I = 1 TO 99 STEP 2
    PRINT I
NEXT I

This will print all odd numbers from 1 to 99. The STEP 2 ensures the loop only increments by 2, thereby producing only odd numbers.

How to draw 3-d pictures in qbasic?

Just smile in front of it and say you don't need to smile as iam already doing it

given by:

dollfy dadhra

What is a random access file in QBasic?

Random access simply means the ability to read and write anywhere in the file, as opposed to sequential access where data is simply appended to the end of the file and is accessed by traversing from the start of the file in sequential order. Random access is ideally suited to data arrays where every element in the file is exactly the same length, allowing constant-time traversal from one element to any other, in both directions. If the data is also sorted, random access also allows binary search to improve search efficiency.

To print even nobetween 10 and 100 on qbasic command?

You need a code that can run to print even numbers between 10 and 100 using the qbasic command.

To convert a hexadecimal number to tis binary equivalent in qbasic?

NOTE: The program below is written in the form of a straight forwards 'table/look up' chart. It will, quite simply, convert no more than 1 single hex digit character, at a time, into its binary number equivalent.

If you wish to convert a whole entire string of hex digit characters together at once; then, I suggest you will need to 'modify' the program yourself by using, possibly, a 'FOR/NEXT loop' statement to extract out each separate hex character which needs to be converted from the users input/together with a function such as, 'MID$()'.

====

Here is a sample program RUN/Output...

Please, enter your single character hex digit(0-9/A-F):

? C

The binary equivalent of the above hex digit is:

1100

What is MUWebControl Class?

MUWebControl Class is an element of a Microsoft Web security process. It should not be removed from the hard drive but an anti-virus scan can be ran if it is suspected that it is not an authentic file.

Draw an algorithm amd flowchat to claculate the roots of quadratic equation Ax2 Bx C0?

  1. READ values of a, b and c,
  2. if a is zero then stop as we do not have a quadratic,
  3. calculate value of discriminant
  4. if D is zero then there is one root: ,
  5. if D is > 0 then there are two real roots: and ,
  6. if D is < 0 there are two complex roots: and ,
  7. PRINT solution.

How do you do a nested loop using Qbasic?

There several methods:

For/Next loop

Do/While/Until loops

You can have Do Loops within Do Loops.

What are the importance of computer in Government?

Computers are used in government for:

Emailing

Distributing Payments

Record Keeping

Direct-Mail Promotions

What is QBASIC expansion?

quick beginners all purpose symbolic instruction code

What are the 2 types of data allowed in QBASIC?

the two types of data used in Qbasic is numeric data and alpha numeric data.

How do you adapt Sanskrit as a programming language?

You don't. A programming language and a spoken language have quite different structures; you don't use one for the other.

Most programming languages are based on English, but that's usually just a few keywords, and perhaps class names, and similar stuff, that's English; the syntax of the programming language has nothing to do with English syntax.

What are two unconditional statements in Qbasic?

UNCONDITIONAL STATEMENT - EXAMPLE 1

In order to understand what is an 'unconditional' statement; you would first need to understand what is it's opposite, namely, what does a 'conditional' statement mean?

In the world of computer programming, a 'conditional' statement is a logical test...; which tests to see if a certain condition has been met...; before producing any further result.

x = 1

IF x = 1 THEN PRINT "One" ELSE PRINT "NOT one"

The conditional test here is...IF x = 1?...only, then, will the word, "One", get printed out; but, on the other hand, if x does NOT = 1...then, the words, "NOT one", will get printed out, instead. This, I'm sure, you'll agree is really quite logical.

The above example can now be compared with using an unconditional imperative statement...which doesn't use any form of logical check...before producing any further result.

x = 2

PRINT "One"

...Here no logical conditional test has been carried out, first; to check to see if variable x really is equal to 1...and, instead, quite unconditionally, the word, "One", is printed out...as being a strictly imperative command...not being based on any conditional test.

Using an unconditional wholly imperative command is like saying...do this...regardless of what the actual condition(s) is/are...which is, most probably, NOT what the programmer's original intentions were to be able to achieve...?!

UNCONDITIONAL STATEMENT - EXAMPLE 2

Again, I will start off by showing you a 'conditional' test statement; followed by showing you an 'unconditional' statement which doesn't use any test.

In this case the statement we are going to use is the DO/LOOP; which is, usually, used to repeat statements that are being written inside the middle of it.

count% = 0

CLS

DO

count% = count% + 1

PRINT count%

LOOP UNTIL count% = 3

END

In this case the loop uses a variable called, count, which begins with the value 0 outside of the loop...this is called, initialising a variable by giving it a value first before you start using it...which is good programming language technique; inside of the DO/LOOP the value of count is incremented by +1; and, next, this value gets printed out by using the PRINT statement; the last line of the loop is a 'conditional' test statement...LOOP UNTIL count% = 3...which checks to see if the count variable has reached the value 3...if the conditional test is NOT true the loop continues counting upwards...; but, if the conditional test does eventually become true, then, the loop stops counting...whenever the value of count does become equal to 3...and, the program breaks out of the loop...to reach it's final END statement; which is where the program stops running.

We can compare the above loop being based on a 'conditional' test; to one without any conditional test...in other words, an 'unconditional' loop...

count%=0

CLS

DO

count% = count% + 1

PRINT count%

LOOP

END

This last example doesn't include any conditional test statement whatsoever to stop the loop from contining to run...; consequently, we've just gone and built what is known as being called an 'endless loop'...; that is, one which will keep on repeating itself, quite simply, forevermore...; the count variable never stops from being incremented...not until when there is an eventual integer overflow error message...; which means the maximum integer value is 32,767...so, when the count variable reaches that value...and, the program next attempts to increment the count variable by +1 more...the program stops by sending out an integer overflow message...you can check this for yourself by pressing key [F4]...which will still display the output screen...when the program has stopped.

NOTE: Whenever you are going to use, sometimes, tricky loops inside of your program; it's important that you remember to include a test condition which will allow the loop to stop looping; otherwise, you will end up with having gone and created an endless loop! There are times when the use of an endless loop is desireable...as when you wish to make the code run and keep running as in a rolling demo; and, other times, not. The way to break out of an endless loop which just won't stop...is to press both the [CTRL] + [BREAK] keys together, at once. You can try this out yourself...by changing the last program...whereever the variable name, count%, is used...change it to say, instead, count...without any (%) integer symbol sign being tacked onto the end of the variable name...and, then, re-run the program again using keys [SHIFT] + [F5].

What are the differences between for next and while wend loops in basic programming?

Both loops are used for repetition.For..next is also called counter loop.For...next loop executes statements for a certain number of time.WHILE ..wend loop executes the statement until a given condition remains true.if the programer knows the repetition in advance then for..next loop is used.if not then while..wend loop is used.

What are the different types of operators in QBASIC?

The different types of operators in QBASIC are:

  • Arithmetic Operators
  • Relational Operators
  • Logical Operators

Why is QBasic called QuickBasic?

Qbasic and Quickbasic are not the same! Qbasic was a free interpreter that Microsoft included with MS-DOS. Although Quickbasic uses similar syntax as quickbasic it allows programs to be compiled.

What is difference between goto and gosub in qbasic?

"GOTO" . . . goes to the line number or label indicated, continues program execution from there,

forgets where it came from and never looks back.

"GOSUB" . . . goes to the line number or label indicated and continues program execution from there,

but remembers where it came from; as soon as it reaches a "RETURN" command, returns to the command

that immediately follows "GOSUB".