QBASIC Important Question Answer Class 10 Computer Science

 QBASIC Important Question Answer Class 10 Computer Science

QBASIC Important Question Answer Class 10 Computer Science


1.       What is a control structure?

Ans: The statement which changes the flow of the program is known as control structure.

 

2.       What is looping?

Ans: Looping is the repetition of certain statements several times during program execution.

 

3.       What is a function?

Ans: A function is a block of codes that can do a specific task.

 

4.       What is library function?

Ans: Library function is the readymade program that is already defined that accepts data and return value.

 

5.       What is a user-defined function?

Ans: The function which is created by the user to perform a certain task is known as a user-defined function.

 

6.    What is a string function?

Ans: The function that accepts string value and returns string value is known as the string function.

 

7.    What is a numeric function?

Ans: The function that accepts numeric data and returns a numeric value is known as a numeric function.

 

8.    What is a parameter?

Ans: A parameter is a value or a variable that is provided in the function.

 

9.    What is an argument?

Ans: An argument is a real parameter that is supplied while calling a function.

 

10.   What is modular programming?

Ans: The process of writing programs by breaking down the whole program into small logical parts is known as modular programming.

 

11.    What is a procedure?

Ans: A procedure is a small block of or a part of a program that does a specific task.

 

12.   What is a variable?

Ans: A variable is a character, symbol, or group of characters that stores program data by allocating memory space.

 

13.   What is a local variable?

Ans: The variable which is declared inside a procedure or a module and cannot be accessed by another module is called a local variable.

 

14.   What is a global variable?

Ans: The variable that is declared in the main module and can be accessed from any sub-module is known as the global variable.


File Handling

15. What is a program file?

Ans: A file that has a set of instructions and can perform a task when it is executed is known as a program file.

 

16. What is a data file?

Ans: Data file is the collection of related data stored in memory.

 

17.    What are the different modes of file handling?

Ans: The different file modes are listed below:

OUTPUT mode -To create a new data file and write data in it.

INPUT mode -To retrieve /read the contents of the existing data file.

APPEND mode - To add more records to  the existing file.

 

 

18. Functions and statements used in file handling:

INPUT # statement: It is used to read the data of a sequential file and stores them in variable.

 

LINE INPUT- # statement:  It reads an entire line from a sequential file and assign to a string variable.

 

EOF() Function: This function is used to check the end of file.

 

INPUT$ Function: It is used to return a part of a string from a file.

 

FILES statement: This statement displays a list of files of a disk or a directory.

 

KILL statement: This statement is used to delete files.

 

NAME statement: This statement renames a file.

 

CHDIR statement: This statement changes a drive's default directory.

 

MKDIR statement: This statement creates a new directory or subdirectory.

 

RMDIR statement: This statement removes a subdirectory (folder).

 

SHELL Command: This command is used to exit temporarily from the QBASIC environment to DOS prompt.

 

SYSTEM command: This command closes all the files and exits permanently from the QBASIC.

Comments