answersLogoWhite

0

...QBASIC program code...

name$="Jack"

startCharPos%=2

howManyChars%=2

PRINT MID$(name$,startCharPos%,howManyChars%)

...output...

ac

EXPLANATION

The MID$() function allows you to select characters from out of a string.

In the above case the string is,...

name$="Jack"

...where...

J= string position 1

a= string position 2

c= string position 3

k= string position 4

...thus, if we select MID$(name$,2,2)...

...this code is actually saying...select from the name...the character which begins at position 2 = a/and, extract 2 characters going along from there... = ac.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What does sign represent in qbasic?

In QBASIC, the Sign function is used to determine the sign of a numeric expression. It returns -1 if the number is negative, 0 if the number is zero, and 1 if the number is positive. This function helps in making decisions based on the value's sign in conditional statements or calculations.


Is there any keyword in c or c plus plus like the function inkey in qbasic?

Using TurboC? kbhit and getch are your friends


How do you write not equal to sign in qbasic?

Well, in QBasic, to write the "not equal to" sign, you can use the "<>" symbol. It's like two friends standing side by side, but not quite holding hands - they're similar, but not exactly the same. Just remember, in the world of QBasic, this symbol will help you show when things are not equal.


How do you write a Qbasic program to display these Numbers-0112358132134?

you do this 10 print "0112358132134" use the whole of the thing


How do you open a Qbasic file?

QBASIC GRAPHICS There any many different things you can draw in QBASIC; ranging from... -dots -lines -rectangles -circles -shapes empty/or, filled in(painted) -you can even do LOGO style programming to draw graphics with; by joining up connected lines -animations are possible, too ==== QBASIC BUILT-IN HELP FILE + CODE EXAMPLES In order to view the QBASIC built-in Help file...; first, load the QBASIC program itself...; and, then, do a combination key press of: [SHIFT] + [F1] Use the built-in QBASIC Help file to learn more about how to use these 'graphic related' commands, and, more...! The QBASIC Help file also contains plenty of 'example codes'; which you can just use 'copy & paste'; then, RUN...to see what the output effect will be...???

Related Questions

How do you use string operators in qbasic?

In QBASIC, string operators allow you to manipulate and combine strings. The primary operator is the concatenation operator, which is the semicolon (;) or the plus sign (+). For example, you can concatenate two strings like this: result$ = "Hello" + " World", resulting in result$ containing "Hello World". You can also use the LEN function to get the length of a string and the MID$, LEFT$, and RIGHT$ functions for extracting parts of strings.


What does sign represent in qbasic?

In QBASIC, the Sign function is used to determine the sign of a numeric expression. It returns -1 if the number is negative, 0 if the number is zero, and 1 if the number is positive. This function helps in making decisions based on the value's sign in conditional statements or calculations.


How to sort the sum of numbers in qbasic?

You use the relevant formula.


What extension would a file saved in Qbasic have?

the extensions of qbasic are that, there are only 80 pixels to write in the qbasic


How do you combine two MID functions in an Excel String Formula?

You could use the CONCATENATE function or the & operator. The following two formulas will do the exact same thing. They both use the MID function to extract two pieces of text and then combine them into one piece of text. =CONCATENATE( MID( A2, 2, 3 ), MID( A3, 2, 4 ) ) =MID( A2, 2, 3 ) & MID( A3, 2, 4 )


How do you download QBasic?

In order to Download Qbasic you may do one, both or none of these two things: 1.) Go to "http://www.softpedia.com/get/Programming/Coding-languages-Compilers/Qbasic.shtml" and click download or 2.) use "Google.com" with the keywords Qbasic free download to find another website with a free qbasic downlaod.


How do you stop a program from running in QBASIC?

To stop a program from running in QBASIC, you can press "Ctrl" + "Break" on your keyboard. This interrupts the program execution and returns you to the QBASIC command prompt. Alternatively, you can close the QBASIC window to terminate the program. If you want to exit gracefully, you can also use the END statement in your code to stop execution at a specific point.


Is there any keyword in c or c plus plus like the function inkey in qbasic?

Using TurboC? kbhit and getch are your friends


Why are rem statements important in qbasic programming?

qbasic is important because its technology


How do you write not equal to sign in qbasic?

Well, in QBasic, to write the "not equal to" sign, you can use the "<>" symbol. It's like two friends standing side by side, but not quite holding hands - they're similar, but not exactly the same. Just remember, in the world of QBasic, this symbol will help you show when things are not equal.


How do you find the product of five numbers in Qbasic?

Most computer languages use the asterisk, "*", for multiplication.


Who had invent QBASIC?

apni maa se puch madherchod kis kis base pe use choda gya tha..... whi btayegi ki kaun QBASIC ka khoj kiya tha..