(IX) Ch-14 QBASIC Programming

1. Fill in the blanks: (a) QBASIC was developed by Microsoft Corporation, USA. (b) QBASIC needs QBASIC.EXE file to work in computer. (c) The smart editor displays all keywords in QBASIC in upper case. (d) If you want to review the syntax of any keyword, then place your cursor on the keyword and press F1. (e) QBASIC supports the mouse to select commands from the menu. (f) The immediate window is used to check the formula, expression or single statement. (g) To get help of QBASIC we need the file QBASIC.HLP. (h) View window is used to write programs. 2. State whether the following statements are true or false: (a) The user can get the help immediately while typing a statement. TRUE (b) The smart editor checks all line at the compilation time. FALSE (c) Alphanumeric labels can be used to make the program more readable. TRUE (d) The find command is used to find the and replace the specified word. FALSE (e) QBASIC is low level programming language. FALSE (f) Subprograms of QBASIC encourages the user to divide a program in small procedures. TRUE 3. Answer the following questions in short : (a) What is QBASIC? Answer : QBASIC is a high level computer programming language developed by Microsoft. In 1985 Microsoft released their own version of BASIC called QBASIC. (b) Give examples of high-level programming language. Answer: QBASIC , C, C++ , Java etc. (c) Name two different windows provided by QBASIC. Answer: View Window and Immediate window (d) Write the function of immediate window. Answer: The immediate window is used to check the formula, expression or single statement. (e) What key is used to run the QBASIC program? Answer: F5 Key (f) Which key is used to switch between different modules of QBASIC? Answer:F2 Key (g) Name the looping statements supported by QBASIC. Answer: (1) FOR - NEXT Loop (2) WHILE-WEND Loop (3) DO WHILE - LOOP 4. Answer the following questions : (a) What is high-level language? Answer: The programming language which is purely problem oriented rather than machine oriented is called high level language. The high level language code is not directly executable. It requires translators like interpreter or compiler. (b) Write any four important features of QBASIC. Answer : Any four features of QBASIC are as follows: (1) Smart editor (2) Sensitive help (3) Decision structures (4) Versatile looping statements (c) Write the functions of the smart editor of QBASIC. Answer: The functions of the smart editor of QBASIC are as follows: - It checks each new line of the code conforms to the line format QBASIC. - It converts reserved words appear in capital letters and all operators and operands are separated by a space. (d) Differentiate between the view window and immediate window of QBASIC. Answer:
View Window Immediate Window
1. The larger or upper window is called view window. 1. Below the view window is a smaller window called the Immediate window.
2. We write whole program in this window. 2. It is used to check formula,expression or single statement.
(e) What are characters sets of QBASIC? Give examples. Answer: All characters that are legal in QBASIC commands, statements, functions, and variables are called character sets. Examples: Alphabets A to Z or a to z Numbers 0 to 9 Parenthesis ( ) etc. (f) Differentiate between copy-paste and cut-paste. Answer:
Copy Paste Cut Paste
1. It allows the user to copy a block from one location to another in a program. 1. It allows the user to move a block from one location to another in a program.
2. In this process of copy paste the original block is not deleted. 2. In this process of cut paste the original block is deleted.