Computer Science for SEE

Technical Terms (Summary)

1. Data: Data can be numbers, letters or symbols representing facts and figures. Data is the collection of row facts, figures, entities or unprocessed unit of information.

2. Information: is the processed or well-organized form of data

3. Database: is a collection of related and organized information that can be used for different purposes. It is organized and well-structured related data about a topic. A database consists of a collection of tables, organized in rows and columns.

4. Database management system (DBMS) allows you to create a computerized database, add, change, and delete data; sort and retrieve from the database and create forms and reports using the data in the database. DBMS: is software, which is used to manage data, manipulate them and provide the information. It is incorporation of related programs to create and manipulate database.

5. Some of the popular DBMS software are MS-Access, Oracle, MS-SQL Server, Mongo DB, MySQL, PostgreSQL etc.

6. Microsoft Access: is a part of the Microsoft Office. It is a Database Management System where data are arranged in the form of tables.

7. Tables, Queries, Reports and Forms are the four main objects of MS-Access database.

8. Table: is a basic structure or building block of a database that contains data organized in rows (records) and columns (fields).

9. Field: is a column or vertical physical unit in a table that contains a specific piece of information within a record.

10. Record: is a row in a table that contains information about a given person, product, or event. Record is meaningful collection of related data.

11. Attribute is category of data/characteristics of data.

12. Attribute/data/field property is characteristics of a group of data in a field.

13. Primary key is unique and non-empty main key attribute of a table. A field that uniquely identifies a record is a Primary Key.

14. Foreign key is referential key to reference the data of master table

15. Sorting: is the process of arranging records in a particular order either ascending or descending order.

16. Query is virtual database object to extract and retrieve or search and update the records from database. A query extracts and arranges information from a table in a manner that you specify.

17. There are two main types of Query used in Access: Select Query and Action Query.

18. Select query is simply used to select and display the relevant data from the database.

19. An action query is a query that makes changes to or removes many records in just one operation. Examples of action query are update query and delete query.

20. Form is one of the MS-Access database objects used to view, modify and add records. Forms are designed to provide a way to customize the presentation of data in your database. It makes data entry and editing easier for the users.

21. The Form Wizard enables you to select the fields from a table or multiple linked tables, layout, and user interface for the form.

22. Report is a printing version database object to print data from table or query.

23. A report helps you to print the output in an effective way to present your data in a printed format.

24. Data type determines the kind of values that you can store in the field.

25. Data Type supported by MS-Access are Short Text, Long Text, Number, Date/ Time, Currency, AutoNumber, Yes/No, OLE Object, Hyperlink, Attachment and Lookup Wizard.

26. The table design window is divided horizontally into two panes. They are: Field Entry area and Field Property area.

27. The field grid pane displays columns in which you can enter the field names, the data type for each field and a description of each field. The field properties area allows you to set field property.

28. Validation Rule is rule applied on data of a field to allow or restrict some data.

29. Validation Text is the text that appears when a record violates the Validation Rule expression.

30. Input mask is standardization of data entry on predefined format.

31. Cascade Update/Delete is one feature of RDBMS to maintain consistence on data.

32. Referential integrity is data integrity on the basis of referential Key that is special used for cascade updating and cascade deleting.

33. Templates: are pre-built databases focused on a specific task.

34. Field properties pane displays list of properties associated with each field data type. To control over the contents of a field we can set the field size, format, validation rule etc. General Properties are:

   a. Field Size: displays list of properties associated with each field data type. To control over the contents of a field we can set the field size, format, validation rule etc.

   b. Caption field property is the alternative name given for any field.

   c. Default Value field property is one that is displayed automatically for the field when you add a new record to the table.

   d. Format field property allows you to display data in a format different from the way it is actually stored in a table. It is also known as display layout for a field.

   e. Input mask field property specifies the pattern of data that you wish to enter into the specific field.

   f. Indexed property to set an index on a field that speeds up searching and sorting of records based on a field.

B. Write Technical Terms for the following:

1. Default database name is ..Database1..

2. Collection of related data in terms of table, form, query and report is ..database..

3. Platform to create, store and organize information on a database is .DBMS software such as MS-Access, MySQL, Mongo DB, Oracle database..

4. Command buttons are used for ....execution of the function/ operation..

5. The object to search and extract record(s) is .. query....

6. New advanced record keeping system .. Cloud-based database management systems, Machine learning-based record keeping systems etc.

7. Default database extension .... accdb...

a. Microsoft Access: .accdb

b. MySQL: .sql

c. Oracle: .dbf

d. Microsoft SQL Server: .mdf

e. MongoDB: .json

8. Fundamental building block of database is ..table....

9. The logical name given to collection of table, form, query, report and macro is ..database.

10. Virtual database object that can supply data to other database object is called View.

11. The field property to apply predefined standard data entry format Input Mask

12. The key field in a table to identify a record uniquely Primary key

13. The field is used to establish relationship between tables Foreign key

14. Field property that limits the values that can be entered into a field Validation

15. The value automatically enters for the new record AutoNumber

16. A field or a group of fields that uniquely identifies the records in database. Primary Key

17. A message displayed after data is entered and checked into a field. Validation messages

18. Field property that defines label for the field Caption

19. It is a database object easy to read, enter and edit individual records. Form.

20. Well-structured and organized collection of data is database

21. Maximum characters can be typed in text field is 255

22. An example of DBMS software is ....MS-Access.

23. It is the component of MS-Access used to enter the data. Table / Data Entry Form

24. A column in Access table is ...field...

25. One or more field having unique value is Primary Key

26. Sorting is the process of arranging data

C. Short Answer Questions

a) What is data?

Data is the collection of row facts, figures, entities or unprocessed unit of information.

b) What is record?

Record is a row in a table that contains information about a given person, product, or event.

c) What are data base objects?

Tables, Queries, Reports and Forms are the four main objects of MS-Access database.

d) What are data types used in MS-Access?

Data Type supported by MS-Access are Short Text, Long Text, Number, Date/ Time, Currency, AutoNumber, Yes/No, OLE Object, Hyperlink, Attachment and Lookup Wizard.

e) What is attribute?

Attribute is category of data/characteristics of data.

f) What is the size of field heading?

The default font size for field headings in Access is 8 pt. and it can be changed as our requirements.

g) What are basic attribute properties?

Basic attribute (also called field or column) properties are the characteristics of an attribute that define how it is stored, displayed, and used in the database. They are: Data Type, Field size, Caption, Validation rules etc.

h) What is referential integrity?

Referential integrity is a set of rules that are used to maintain consistency and accuracy of data in a relational database.

Long Answer Questions

a) Why do we need to set field property options?

Field property options (attribute properties) are used to define how a field or attribute is stored, displayed, and used in a database. It helps to check validation, data security etc.

b) What are the field property options?

Some common field property options are: Data type, Field size, Default value, Validation Rule, Input Mask, Caption, Index, Required, Primary Key.

c) What are controls used in Forms?

Controls are the individual elements used to enter, view, and manipulate data in the form. Some common types of controls are: Text Box, Check Box, List box, Image, Label etc.

d) Define database. Write any four data types of MS- Access.

A database is a collection of related data that is organized and stored in a structured way. Some data types of MS-Access are: Text, Number, AutoNumber, Data/Time, Yes/No etc.

e) What is data sorting? Write its advantages.

Data sorting is the process of rearranging the records in ascending or descending order in a table. Advantages to sorting data in a database are:
   1. Easier Data Retrieval
   2. Improved Data Analysis
   3. Time Saving
   4. Data security
   5. Increased efficiency etc.

f) Define query? Write any two types of Queries used in MS- Access?

A query is a tool used to retrieve specific data from one or more tables based on certain criteria. Two types of Queries used in MS- Access are: Select Queries, and Action Queries.

g) Difference between field and record with examples.

A field (column or attribute) is a specific piece of information that is stored for each record in a table. E.g. "Customer Name," "Address,"
A record (row or tuple) is a collection of related fields that make up a single unit of information in a table. E.g. Surendra, Bardiya

h) What is filtering? Write a different between sorting and filtering.

Filtering is the process of selecting specific records or rows from a table or query based on certain criteria.
Filtering displays only the data that meets the specified criteria, where Sorting is the process to organize in order and display all data as our requirement.

i) What is table? List the database objects.

Table: is a basic structure or building block of a database that contains data organized in rows (records) and columns (fields).
Main objects of MS-Access database are Tables, Queries, Reports and Forms.

j) What is a primary key and why it is required?

A primary key is a field or a set of fields in a table that is used to uniquely identify each record in the table. A primary key is required for creating relationships, unique identification, enforcing data integrity, improving data retrieval etc.

k) What is DBMS? Write any two examples of DBMS software.

Database management system (DBMS) is a software used to manage data, manipulate them and provide the information. E.g.: MS-Access, Oracle, MS-SQL Server, Mongo DB

l) What is form? Write any two advantages of using form.

Form is one of the MS-Access database objects used to view, modify and add individual records. It makes data entry and editing easier for the users.

m) What is database? Give an example of database.

Database: is a collection of related and organized information that can be used for different purposes. E.g. Facebook, Phone book, marks ledger etc.

n) What is a query? Why do we use query?

Query is virtual database object to extract and retrieve or search and update the records from database. Queries are used to retrieve, update, or manipulate data stored in a database.

o) What is validation rule? What is input mask?

Validation rule is a set of criteria or conditions used to check the data for errors or inconsistencies, and correct data type etc.
An input mask is a way of controlling the format of data that is entered into a field and automatically format data as it is entered.

p) What is the importance of Query in database?

The importance of Query in database are: Data Retrieval, Data manipulation (calculation), Data analysis, Data filtering, Data security etc.

q) Differentiate between Select query and Action query.

A SELECT query only retrieves the data, while an action query modifies the data in a database.
A SELECT query is a type of SQL query that is used to retrieve data from one or more tables in a database.
ACTION query is a type of SQL query that is used to make changes to the data in a database, such as inserting new records, updating existing records, or deleting records.

Reading material

Q1. Computer Fundamentals: Short answer questions

(a) What is a computer network?

Ans: Computer Network is the group of different computing devices interconnected or interlinked for sharing resources (hardware, software, information).

(b) Define Protocol.

Ans: Protocol is the set of standard rules for transmitting data and making communication among different devices. E.g. TCP, IP, POP, UDP, FTP.

(c) What is the business done through the internet?

Ans: The business done through the Internet is known as E-Business / E-commerce. There are different types of online business process.

(d) Which data type is used to store alpha numeric characters or special symbols in MS-Access?

Ans: Text data type is used to store alpha numeric characters or special symbols in MS-Access.

(e) Which view is used to modify a table in MS Access?

Ans: Design view is used to modify a table in MS Access.

(f) What is modular programming?

Ans: Modular programming is the process of dividing a computer program into separate sub-programs to make programming easier and flexible.

(g) What is communication media?

Ans: Communication media refers to the means or medium of transferring (delivering and receiving) data or information.

(h) What is database?

Ans: A database is an organized collection of information, or data, with some purpose and stored electronically in a computer system.

(i) Define digital citizenship.

Ans: Digital citizenship is the citizen having ability to safely and responsibly access digital technologies, as well as being an active and respectful member of society, both online and offline. Or A digital citizen is a person utilizing information technology (IT) in order to engage in society, politics, and government.

(j) What is cybercrime?

Ans: Cybercrime is the illegal or criminal activities done by using computer and internet.

(k) What is Electronic Transaction Act?

Ans: Electronic Transaction Act 2063 (also known as ETA 2064) is regulating act for all the electronic transaction related issues and cybercrimes.

(l) Define Firewall.

Ans: A firewall is the network security systems that monitors and controls the traffic flow between the Internet and private network.

(m) What is computer security?

Ans: Computer security basically is the protection of computer systems and information from harm, theft, and unauthorized use.

(n) What is biometric verification?

Ans: Biometric verification is uniquely identified by evaluating one or more distinguishing biological traits.

(o) Define E-Commerce.

Ans: E-Commerce refers to the buying and selling of goods and products over computer communication network such as the Internet.

(p) What is Online Payment?

Ans: Online payment refers to the payment for buying goods or services through the Internet using different online payment gateway.

Q2. Write the technical term or phrases of following statements.

(a) Sending and receiving messages electronically through the Internet. Messanger

(b) Law that governs the legal issues of cyberspace. Cyber-Law/ Cyber-Ethics

(c) Buying and selling of goods, products, or services over the Internet. E-Commerce

(d) The smallest unit to represent information on quantum computer. A quantum bit or qubit

(e) The websites that search documents for specified keywords in WWW. Search Engines

(f) The skilled computer expert who uses technical knowledge to overcome a problem. Hacker

(g) The process of identifying an individual usually based on a username and password. Authentication

(h) The network security systems that monitor and control the traffic flow. Firewall.

(i) The technology to encode file or message encoding

Q3. FULL FORM

(a) NIC = Network Interface Card

(b) SMTP = Simple Mail Transfer Protocol

(c) MODEM = MOdulator and DEModulator

(d) FTP = File Transfer Protocol

Q4. Answer the following questions

(a) Write any 2 differences between client/server and peer to peer architecture of the network.

Ans: Client/Server: In Client-server network, one will be server and other client computers. It is Expensive and suitable for all organizations.

Peer-to-Peer networkIn Peer-to-Peer network, no any computer will be as server, or clients. It is cheaper and suitable for only small organizations

(b) Distinguish between bounded and unbounded media in two points.

Ans: Bounded media:is the media guided by a solid medium like cables. It is cheaper. It is also called guided media.

Unounded mediais the medium which is not guided by any physical cables. it is costly. It is also called unguided media.

(c) What is cyber ethics? Write any two importance of Cyber-Ethics.

Ans: Computer ethics is a concept in ethics that addresses the ethical issues and constraints that arise from the use of computers technologies. Cyberethics is a branch of computer technology behavior that defines the best practices that must be adopted by a user while using computer system. It Prevents Misuse of Personal Information, Prevents Theft of Intellectual Property, and Prevents Loss of Various Jobs in the field of Software Development.

(d) Write any four commandments of computer ethics.

Ans: The Ten Commandments of Computer Ethics
1. Do not use a computer to harm others
2. Do not interfere with others’ computer work.
3. Do not browse through other people’s data files.
4. You should not cheat anyone with a computer.
5. Do not bear false witness with the help of a computer.
6. Do not copy or use proprietary software that you have not paid for.
7. Do not use other people’s computer resources without authorization or proper compensation
8. You should not appropriate other people’s intellectual output
9. You must consider the social consequences of the programs or processes you are writing or constructing.
10. Always use a machine in a manner that is kind and respectful to other people.

(e) What is software security? Write any two measures of hardware security.

Ans: Software security is the process to protect software against malicious attack and other hacker risks so that the software continues to function correctly.
Some Important measures of hardware security:
1) keep the system software updated
2) make sure that you have your wits with you
3) enable a firewall such as, comodo and tiny wall
4) adjust your browser settings
5) install anti virus and anti spyware software
6) protect and lock your device by a strong password
7) encrypt your data
8) use VPN
9) switch off the system after using
10) plugged off the system during thunder storm

(f) What is m-commerce? Write its two important services.

Ans: M-Commerce (Mobile commerce) refers to the process of buying and selling of goods and services through smartphones, tablets or personal digital assistants (PDAs).
The Important services of M-commerce are:
a) Purchasing airline tickets
b) Purchasing movie tickets
c) Restaurant/Hotel booking and reservation
d) Top-Up Charges
e) Balance Enquiry
f) Utility Payment
g) Fund Transfer

(g) What is IoT? Write any two importance of it.

Ans: IoT (Internet of Things), the most important technologies: is a system of interrelated computing device to exchange information over a network without human-to-human or human to computer interaction.

(h) What is primary key? List any two advantages of it.

Ans: Primary Key is a special field or group of fields in the table that uniquely identifies each record from the database.
Importance of Primary Key are:
To identify each record of a table uniquely.
To reduce and control duplication of the record in a table.
To set the relationship between tables. .

(i) What is data sorting? List any two advantages of using it.

Ans: The process of arranging all the records in a table either ascending or descending order based on field or fields is known as sorting. Text types of data are sorted in alphabetical order (i.e. A to Z or Z to A). Date and Time data are sorted from oldest to newest or newest to oldest. Save out time.

(j) What types of work is done in MS-Access using Form and Query object?

Ans: FORM object in MS-Access is used to interface window for your to get require data where QUERY object is used to perform some calculations and operations on data.

(k) Write any two opportunities and two threats in social media.

Ans: Social media is a process of performing a variety of tech-enabled activities via virtual communities and network. It plays a vital role in changing the way of people communicate and keep in touch. It provides tremendous opportunities for various brands to reach their customers. They are:
a) Brand Development: social media is a spectacular tool to grow a business. It allows customers to connect and interact with the business on a more personal level.
b) Target Audience: Social media is one of the effective platforms to reach the target audience. c) Customer Interaction
d) Attracting Customer
e) Research
Social Media Threats:
i. Social Engineering One of the biggest threats of social media is social engineering.
ii. Targeted Phishing Attacks These attacks are carried out to steal money or certain confidential information.
iii. Fake Accounts
iv. Social Media used for spreading spam and malware

(m) What is a power protection device? Write its role in computer security.

Ans:A power surge protector is a device that is used to safeguard other electrical devices against any power surge, small or large, and protect them to be damaged. A power surge protector also works as a common outlet for multiple devices.

(n) Write any four advantages of cloud computing?

Ans: Cloud Computing is an Internet-based computing to provide online resources (software, platform, infrastructure) on demand basis. E.g.Google Drive. The advantages of cloud computing are:
1. it allows to store, process, share resources.
2. it is more secure and easy accessible
3. it is cheaper than other storage.
4. it provides various platform such as education, businesss etc.

(o) How is AI software is different from other software?

Ans: Artificial intelligence (AI) is the study of how computers can solve problems by imitating human intelligence. This involves tasks such as learning, reasoning, and natural communication. In contrast, traditional software is a program that runs on your computer. It can be installed from a CD or downloaded online.

(p) Define indexing. Mention any two importance.

Ans:

(q) Define freezing and unfreezing the column. How is it done?

(r) What is Query? Write any two importance of Query in database?

(s) What is form? Why form is required in MS-Access?

Q5. Write the output of the given program. Show with dry run table. [2]

Q6. Re-Write the given program after correcting the bugs. [2]

Q7. Study the following program and answer the given questions. [2*1=2]

Q9. Write QBASIC programs (any three): [3 * 4 = 12]

(a) Write a program in QBASIC that asks to input Name of student and display Roll, Name, Class, Age of the Student from “record.txt” file.

Open "INFO.dat" For Input As #1
Input "Enter name of the students "; Sn$
While Not EOF(1)
Input #1, R, Nm$, Cl$, A
If UCase$(Sn$) = UCase$(Nm$) Then
Print R, Nm$, Cl$, A
End If
Wend
Close #1
End

(b) Write a program in QBASIC to print the following Fibonacci series using SUB procedure: 1 1 2 3 5 8 up to nth term.

DECLARE SUB Fibo (N)
CLS
INPUT “ENTER THE NUMBER OF TERMS”, N
CALL Fibo (N)
END
SUB Fibo (N)
A=1: B=1
PRINT A, B,
FOR A = 1 TO N STEP 1
C = A + B
PRINT C,
A = B
B = C
NEXT
END SUB

(c) Write a program in QBASIC that asks length, breadth and height of room and calculates its area and volume. Create a user-defined function to calculate area and sub-program to calculate volume. Hint: [A = L x B], [V = L x B x H].

DECLARE FUNCTION AREA (L, B)
DECLARE SUB VOLUME (L, B, H)
CLS
INPUT “ENTER length, breadth and height of room”, L, B, H
PRINT “THE AREA OF ROOM IS:”, AREA (L, B)
CALL VOLUME (L, B, H)
END
FUNCTION AREA (L, B)
AREA = L * B
END FUNCTION
SUB VOLUME (L, B, H)
V = L * B * H
PRINT “THE VOLUME OF ROOM IS: “, V
END SUB

(d) Write a sequential data file called “Record.txt” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose gender is ‘F' and obtained marks in computer is more than 90.

Open "Record.txt" For Input As #1
While Not EOF (1)
Input #1, R, Nm$, Gender$, a, b, c, d
If UCase$(Gender$) = “F” and d >= 90 Then
Print R, Nm$, Gender$, a, b, c, d
End If
Wend
Close #1

(e) Write a program to display record stored on fields Roll, Name and Age of students on file “Info.dat”.

Open "Record.txt" For Input As #1
While Not EOF (1)
Input #1, R, Nm$, a
Print R, Nm$, a
Wend
Close #1

(f) Write a program in QBASIC to check whether input number is Palindrome of not using function procedure.

DECLARE FUNCTION PAL$(N)
CLS
INPUT “ENTER A NUMBER”, N
PAL$ (N)
END
FUNCTION PAL$(N)
ORG = N
WHILE N<>0
R = N MOD 10
P = P * 10 + R
N = N \ 10
WEND
IF ORG = P THEN
PAL$ = “THE NUMBER IS PALINDROME”
ELSE
PAL$ = “THE NUMBER IS NOT PALINDROME”
END IF
END FUNCTION

Computer Network and Internet

A. Summary

1) The process of sending and receiving data and information between two or more than two person is known as communication.

2) Telecommunication is a system of transmission of sounds, images, texts or data in the form of electronic signals.

3) A communication or transmission medium is a channel through which data or signals can be transmitted from one point to another.

4) Simplex mode is transmission of data or information that can take place in only one direction.

5) The five basic components (data, sender, medium, receiver and protocol) are required to make data communication.

6) Twisted pair wire is made up of copper and a pair of wires are twisted together and insulated with plastic.

7) Co-axial cable is made up of copper or aluminium wire with an inner conductor surrounded by insulating layer and again surrounded by conducting shield.

8) Fiber optic cable uses light wave to carry data signal from one end of cable to another end.

9) Bandwidth refers to the volume of data that can be transmitted through the communication medium.

10) Nowadays, wireless technology is used in communication technology and uses radio signal for receiving and transmitting electronic data.

11) In Nepal, radio wave transmission is used in rural and hilly areas.

12) Microwave is high frequency wave which is used to transfer signals through atmosphere.

13) Text, photo, video, etc. can be transferred worldwide by using satellite communication.

14) Computer network is two or more than two computers connected to each other through wire or wireless media to share data or information, hardware, software and other resources.

15) The hardware used in network are computer set, modem, hub, NIC card, bridge, repeater, etc.

16) NIC card provides a port on the back of system unit to connect a computer in network.

17) The different types of connectors are RJ- 45 connector, BNC connector and ST connector.

18) Network software is important software which controls and manages computer network.

19) A set of rules followed for interconnection and communication between computers in a network is called protocol.

20) Networks can be organized into three different models. They are: i. Centralized computing ii. Client/Server iii. Peer-to-peer.

21) A server is the main computer that provides services, data and other resources to the other computers in the network environment.

22) The main three types of computer network are LAN (Local Area Network), MAN (Metropolitan Area Network) and WAN (Wide Area Network).

23) Network architecture defines how the computer communicates and interacts with each other on network.

24) The arrangement or connection pattern of computers or nodes and other devices of a network is a known as network topology.

25) Network topology is the inter-connected pattern of network components.

26) The worldwide connection of computer networks and that uses TCP/IP protocols to communicate with one another using wire or wireless media as well as network devices is called Internet.

27) The main Internet services are IRC, search engine, FTP, Telnet, E-Commerce, etc.

28) Network Interface Card (NIC) is a hardware device that connects two different nodes physically.

29) A hub is a device with multiple points or ports. It acts as a central point for different computers and other devices.

30) Software is the major component to create a network environment to share data and other resources.


B. Write the technical word or phrases of following statements.

(a) Sending and receiving messages electronically through the Internet. Messanger

(b) Law that governs the legal issues of cyberspace. Cyber-Law/ Cyber-Ethics

(c) Buying and selling of goods, products, or services over the Internet. E-Commerce

(d) The smallest unit to represent information on quantum computer. A quantum bit or qubit

(e) The websites that search documents for specified keywords in WWW. Search Engines

(f) The skilled computer expert who uses technical knowledge to overcome a problem. Hacker

(g) The process of identifying an individual usually based on a username and password. Authentication

(h) The network security systems that monitor and control the traffic flow. Firewall.

(i) The technology to encode file or message encoding

QBASIC Programming Theory

Modular Programming - Theory (One-mark Questions)

1. What is QBASIC?

Ans: A modular programming language, where program is divided in different modules or functions is called QBASIC.

2. What is syntax?

Ans: The rule and grammar followed while writing statements, functions and variables in any programming language is called syntax.

3. Define variable and constant.

Ans: A location in the memory, contents of which can be changed during program execution is called Variable.

A symbol whose value does not change during program execution is called Constant .

4. What is operator?

Ans: Symbols, which are used for mathematical calculations, logical and string operations is called operator.

5. What is relational operator?

Ans: Relational operator is symbol, which are used in relational or logical expressions.

6. What is Logical operator?

Ans: Logical operators are symbols, which are used to combine two or more logical or relational expressions and return a single true or false value.

7. What is looping?

Ans: A control structure that executes the same program statement or block of program statements repeatedly for specified number of times or till the given condition is satisfied is called Looping.

8. What is nested loop?

Ans: A loop within another loop is called nested loop.

9. What is infinite loop

Ans: Never terminating loop is called infinite loop.

10. What is array?

Ans: A collection of the data of similar type, all of which are referred by a single variable name with different subscripts is called array.

11. Define user defined functions.

Ans: The function which is written and stored by the programmer to do the specific task is called user defined functions. The programmer defines this type of function, if QBASIC does not provide a built-in function to solve any problem required by the programmer. FUNCTION - END FUNCTION statement can be used to define a user defined function. Example: DECLARE FUNCTION SUM (NUM1,NUM2) .

12. Define built-in or Library Functions.

Ans: The functions provided by the QBASIC system is called built in or library functions. They allow the programmer to use them according to the requirement. Built in functions require to be called by the programmer to use them in a program. Example: LEN, MID$ etc.

13. Define modular Programming.

Ans: An approach in which the program is divided into separate independent units, called modules to perform specific task is called modular programming.

14. Mention any two advantages of modular programming.

Ans: (i) Reducing redundancy of code (Code re-usability) (ii) Saving time during project development

15. Why QBASIC is called modular programming language?

Ans: QBASIC is called modular programming language because it allows the user to divide program into manageable and functional modules or blocks with the help of sub procedure and function procedure.

16. Define Main module.

Ans: The top level module is called main module, which is located at the top of all procedures such as sub procedures or function procedure. It is the entry point of modular programming. Procedure name and parameters are declared and called from the main module.

17. Define Sub Procedure.

Ans: A small manageable and functional part of a program that performs specific tasks and does not return any value to the calling module is called Sub procedure.

18. What is the use of CALL statement.

Ans: The CALL statement transfers the control to sub procedure and statement in the sub procedure execute. It is used to call or execute a sub procedure from the main module.

19. Define arguments.

Ans: The constant or variables enclosed in the parenthesis of procedure call statement and that are supplied to a procedure are called arguments. It is also known as actual parameter. The argument can be passed to a procedure either by reference or by the value method.

20. Define parameters.

Ans: Variables in sub module or a procedure declaration which accept data or variables passed to them from the calling module are called parameters. It is also known as formal parameter.

21. Define Local Variable.

Ans: A variable which is defined in a module and is not accessible to any other modules is called local variable. It is only accessible to the module where it is defined. Value of local variable is destroyed when execution of module is over.

22. Define Global Variable.

Ans: A variable in main module which can be accessed from any modules or procedure of a program is called global variable. Variable can be made global declaring them with DIM SHARED or COMMON SHARED or SHARED attribute.

23. Write about Passing argument by reference.

Ans: Arguments are normally passed to a sub program by reference, which gives the procedure access to the actual variable. In this method, the address of each variable is passed to the procedure. The changes made in the procedure's variable they will make change in the value of arguments. It is the default mode of passing arguments in QBASIC. Example: CALL TEST (A,B)

24. Write about Passing argument by value.

Ans: Argument passed by the value method does not make any effect to value of the variables which are passed to a procedure even they are changed in the procedure. When arguments are passed by value method, it makes a duplicate copy of arguments and their values are used directly in the parameters. The changes made in the procedure's variable they does not make any change in the value of arguments. To pass argument by value method each argument is enclosed in individual parentheses in the calling statement. Example: CALL TEST ( (A) , (B) )

25. Define procedure.

Ans: A collection of code which perform an action is called procedure.

26. Mention the types of procedure.

Ans: (i) Sub procedure (ii) Function procedure

27. List any two advantages of procedure.

Ans: (i) It divides big program into small manageable module , makes easy to debug. (ii) It reduces the program codes because a single module can be used in different places.

28. Differentiate between Function and Sub procedure.

Ans:

Function Procedure (i) It returns value. (ii) It does not use call statement.

Sub Procedures (i) It does not return value. (ii) It uses call statement.

Achievements

!

500+

Courses

25+

Awards

50,000+

Students