Topics

Search This Blog

Monday, March 17, 2025

Programming: QBASIC, Modular programming, File Handling, C programming

VERY SHORT ANSWER (KEYWORDS ONLY):

Programming: QBASIC, Modular programming, File Handling, C programming


1.       What is QBASIC?

Beginners' programming language

2.       Which command is used to clear the screen in QBASIC?

CLS

3.       Which statement is used to take input from the user?

INPUT

4.       Which statement is used to display output on the screen?

PRINT

5.       What is the use of the LET statement in QBASIC?

Assigns values to variables

6.       Which loop executes a block of code multiple times?

FOR...NEXT, WHILE...WEND, DO...LOOP

7.       What is the function of the INT() function in QBASIC?

Returns the integer part of a number

8.       Which operator is used for exponentiation in QBASIC?

^ (Caret)

9.       Which keyword is used to define a subprocedure in QBASIC?

SUB

10.   Which command is used to terminate the program execution?

END

11.   What is modular programming?

Dividing a program into smaller modules

12.   What are the two main modular programming structures?

Subroutines and Functions

13.   Which keyword is used to define a subroutine in QBASIC?

SUB

14.   Which keyword is used to define a function in QBASIC?

FUNCTION

15.   What is a module?

A self-contained program block

16.   What is the main advantage of modular programming?

Code reusability

17.   What is the difference between a function and a subprocedure?

Function returns a value; subprocedure does not

18.   Which programming technique does modular programming support?

Top-down approach

19.   Which command is used to call a function in QBASIC?

CALL function_name

20.   What is a library in modular programming?

A collection of reusable modules

21.   What is file handling?

Reading and writing files

22.   Which statement is used to open a file in QBASIC?

OPEN

23.   Which mode is used to read a file?

INPUT

24.   Which mode is used to write to a file?

OUTPUT

25.   Which mode is used to add data to an existing file?

APPEND

26.   Which statement is used to read data from a file?

INPUT #

27.   Which statement is used to write data to a file?

PRINT #

28.   Which function checks the end of a file in QBASIC?

EOF()

29.   Which statement is used to close a file in QBASIC?

CLOSE

30.   What is the purpose of a sequential data file?

Stores data in a continuous sequence

31.   What is structured programming?

Organizing code using functions and loops

32.   Which are the main control structures in structured programming?

Sequence, Selection, Iteration

33.   What is the main advantage of structured programming?

Better code readability and maintenance

34.   Which symbol is used to terminate a statement in C?

Semicolon (;)

35.   Which function is used to display output in C?

printf()

36.   Which function is used to take input in C?

scanf()

37.   Which loop is used for definite iteration in C?

for loop

38.   What is a function in C?

A reusable block of code

39.   Which keyword is used to define a function in C?

void, int, float, etc.

40.   What is recursion in C?

A function calling itself

No comments:

Post a Comment

Map of Nepal

 नेपालको नक्सा:  नेपालको नक्सा: नेपालको नक्सा: नेपालको नक्सा: नेपालको नक्सा: नेपालको नक्सा: नेपालको नक्सा:

Most viewed!