Monday, February 2, 2026

Asmita’s Chapter Wise Technical Term [2 Marks]

 

Asmita’s Chapter Wise Technical Term:

  1. A company that provides services of internet. ISP (Internet Service Provider)
  2. A computer network limited within a room. LAN (Local Area Network)
  3. A network which is extended beyond the boundary of the countries. WAN (Wide Area Network)
  4. Network of networks. Internet
  5. A device which can convert analog signal to digital codes and vice versa. MODEM
  6. The device used to connect PC with telephone line. MODEM (Modulator-Demodulator)
  7. The communication device that converts digital data into analog and vice versa in computer network. MODEM
  8. A main computer in the computer network. Server
  9. A computer in a network which can provide services to other computers. Server
  10. A computer which provides services to other computers in a network. Server
  11. Hub or switch-based network topology. Star Topology
  12. The interconnection between two or more computers through physical and logical components to share resources. Computer Network
  13. Network sharing and exchanging information between different people. Computer Network
  14. The data carrying capacity of communication channel. Bandwidth
  15. Number of bits that can be transferred per second over a given transmission medium. Bandwidth
  16. A card through which a computer is connected to the network. NIC (Network Interface Card)
  17. A type of network in which every computer works as both client and server. Peer-to-Peer Network
  18. A device that can connect networks which may use different communication protocols. Gateway
  19. The physical layout of local area network. Network Topology
  20. Buying and selling product and services online. E-Commerce
  21. Business through internet. E-Commerce
  22. The use of Internet to buy and sell goods and services. E-Commerce
  23. Rules and format to accept and transfer data in computer network. Network Protocol
  24. A set of rules that governs how computer exchange information over computer Network. Network Protocol
  25. The rules that makes the network communication possible. Network Protocol
  26. A set of rules that governs the communication among the computers in a network. Network Protocol
  27. Communications protocol for the transfer of information on the internet. TCP/IP (Transmission Control Protocol / Internet Protocol)
  28. A standard protocol for electronic mail transmissions across the Internet. SMTP (Simple Mail Transfer Protocol)
  29. A protocol used to retrieve email from a mail server. POP (Post Office Protocol)
  30. A set of communications protocols used for the Internet and other similar networks. TCP/IP (Transmission Control Protocol / Internet Protocol)
  31. A protocol used for transmitting and displaying information in the form of web pages on browsers. HTTP (Hypertext Transfer Protocol)
  32. A unique address of assigned to each computer connected to the internet. IP Address
  33. An Internet protocol that is required to use Internet Telephony service. VOIP (Voice over Internet Protocol)
  34. The protocol used by e-mail client to download e-mails from the e-mail server. POP (Post Office Protocol)
  35. An Internet tool that helps to upload/download the file. FTP (File Transfer Protocol)
  36. The protocol that makes the communication possible. Network Protocol
  37. An internet tool that helps to upload/download the file. FTP (File Transfer Protocol)
  38. A software which enables to view HTML pages in the Internet. Web Browser
  39. A company that provides the Internet facility. ISP (Internet Service Provider)
  40. Protocol used to receive e-mail form the mail server. POP (Post Office Protocol)
  41. The business conducted through Internet. E-commerce
  42. The process of transferring data or information between computers. FTP (File Transfer Protocol)
  43. The mode of transmission in which communication takes place from both the sides simultaneously. Full-Duplex Mode
  44. The mode of only one way communication system. Simplex Mode
  45. The virtual message sharing method of communication. Video Conference
  46. The network architecture in which drives. files and printers on every computer can be available to every other computer on the network. Peer-to-Peer Network
  47. The rules required to help entities communicate or understand each other or complete set of rules and standards that allow different devices to hold conversation. Network Protocol
  48. The computer on which users run applications. Client
  49. The amount of data that can be transmitted through communication channels in fixed time period. Bandwidth
  50. Any network device that can connect to the network and can generate process or transfer network data. Node
  51. The device which controls the flow of data between computers in a network. NIC (Network Interface Card)
  52. A form of wireless transmission in which signals are sent via pulses of infrared light. Infrared
  53. Wireless communication media for short distance. Bluetooth
  54. A form of wireless transmission in which signals are sent via pulses of electromagnetic energy in the microwave region of the spectrum. Microwave Transmission
  55. A form of wireless communication in which signals are sent via radio frequencies. Radio Wave Transmission
  56. A device with multiple ports that joins multiple computers together. Hub
  57. The network architecture in which all the computers have equivalent capabilities and responsibilities. Peer-to-Peer (P2P) Network
  58. The software which controls and manages all the operation in computer network. Network Operating System (NOS)
  59. The computer that controls and coordinates all the activities of the entire computer in a network. Server
  60. The physical layout or cabling structure of computers on local area. Network Topology
  61. The topology in which all the computers are connected by a common distribution channel. Bus Topology
  62. The topology in which all the computers are connected to each other in a close loop in a single cable. Ring Topology
  63. A communication media which use light to carry a data signal through the cable. Fiber Optic Cable
  64. A wireless technology that can be used to transmit data between two different networks. Wi-Fi (Wireless Fidelity)
  65. A device that connects and controls two dissimilar networks together. Gateway
  66. The network architecture consisting at least one server and one or more clients. Client-Server Architecture
  67. The device which connects similar networks having same protocols. Bridge
  68. The device which accepts weak signals regenerates them and sends them back their way. Repeater
  69. The language used for creating web pages. Hypertext Markup Language (HTML)
  70. First computer network system. ARPANET (Advanced Research Projects Agency Network)
  71. The visual communication of parties around the world. Video Conferencing
  72. The process of sending and receiving messages electronically through the internet. E-mail
  73. The bulletin board service (BBS) or public message group service of Internet. Usenet
  74. Internet service that allows people to communicate with each other by typing in real time. IRC (Internet Relay Chat)
  75. A single page of website that contains information in specific topic or subject. Web Page
  76. Collection of web files on a particular subject. Website
  77. The huge collection of hypertext documents on Internet. World Wide Web (WWW)
  78. The very first page of every web site. Home Page
  79. It is the address which is used by various devices in the network for accurate location of logical address. IP Address
  80. A unique address for a collection of related hypertext documents in web server. URL (Uniform Resource Locator)
  81. The program that allows to log into another computer on the Internet. Telnet
  82. Software or programs that search the websites for us. Search Engine
  83. Standardized naming convention for identifying a web document or file, in a sense the address of a link. URL (Uniform Resource Locator)
  84. Software that is used for surfing information through the internet. Web Browser
  85. Message sent electrically through computer network. E-mail
  86. An audio video communication system using internet. Video Conferencing
  87. The process of copying files, documents, programs from users computer to the web server. Upload
  88. The smallest unit to represent information on quantum computer. Quantum Bit (Qubit)
  89. Learning through the electronic media. E-Learning
  90. A powerful program that control and coordinates a computer's hardware devices and runs software and application. Operating System (OS)
  91. An illegal activity done through computer and internet. Cyber Crime
  92. The rate at which data is transmitted through a given medium. Data Transfer Rate / Bandwidth
  93. The websites that search documents for specified keywords in WWWSearch Engine
  94. The recording of interaction with the digital world. Digital Footprint
  95. Digital trails created while using internet. Digital Footprint
  96. Data transmission in only one direction. Simplex Mode
  97. Learning through the electronic media. E-Learning
  98. Laws regarding Internet or Legal issues of Cyber Space. Cyber Law
  99. The rules and regulations to systematize the computer related technology. Cyber Law
  100. The law which controls the crime which is done with the help of computer and Internet. Cyber Law
  101. Moral rules to be followed by computer and other professionals. Computer Ethics
  102. The moral principles that control cyber crime. Computer Ethics
  103. A program that destroys other program. Computer Virus
  104. A program that effect the normal functioning of computer. Computer Virus
  105. Program used to detect and eliminate computer virus. Antivirus Software
  106. The software that protects computer from virus. Antivirus Software
  107. A program that can disinfect a file from virus. Antivirus Software
  108. Any illegal activities that involves a computer, computer system or computer network. Cybercrime
  109. A program that detects and prevents computer from the computer viruses. Antivirus Software
  110. A computer program that entertain and damages user's files. Computer Virus
  111. A malicious program does not hide in other files but spread to other computer without infecting files. Computer Worm
  112. A category of malicious code that includes viruses, worms, and Trojan horses. Malware
  113. A person who breaks and use password of others computer and file illegally. Hacker
  114. A self-replicating computer program which does not need to attach itself to an existing program. Computer Worm
  115. A program that can disinfect a file from virus. Antivirus Software
  116. Anyone who uses digital tools such as computers, cell phones or the internet. Digital Citizen
  117. A legal right that grants the creator of an original work. Copyright
  118. An electronic form of signature that can be used to authenticate the identity of the sender of message. Digital Signature
  119. Digital marks created while using internet. Digital Footprint
  120. A secret group of characters used to protect computer system from unauthorized users. Password
  121. A program that can disinfect a file from virus. Antivirus Software
  122. A system of copying data and information residing in computer into another location. Backup System
  123. A secret code that gives the user to access particular program and system. Password
  124. A secret word that gives user access to a particular program or computer system. Password
  125. Secret group of characters which helps to protect file from unauthorized person. Password
  126. Making duplicate copy of file for security purpose. Backup
  127. A spare copy of important program and documents. Backup
  128. Making an extra copy of data and software. Backup
  129. A branch of technology that protects the machine from theft, corruption, or natural disaster. Computer Security
  130. Device used for power protection. Volt Guard
  131. An electric device that supplies electric current when electricity is cut off. UPS (Uninterruptible Power Supply)
  132. The method of consolidating fragmented files on the computer. Disk Defragmentation
  133. A person who steals or destroys other's data, information and program. Hacker
  134. Device used to protect electronic device from high voltage. Surge Protector
  135. A copy of file that is used when the original file is corrupted. Backup
  136. A program that checks and keeps hard disk in good condition. Scan Disk
  137. A program that rearranges the fragmented files. Defragmenter
  138. The process of rearranging the fragmented files in the contiguous spaces on the disk. Disk Defragmentation (Corrected from "Volt Guard")
  139. A device that protects computer system from the fluctuation of electric voltage. Volt Guard
  140. The process of restoring encrypted data to its original form. Decryption
  141. A malicious code designed to gain access to a system. Malware
  142. The process of selling or exchanging products, services or information using electronic media. E-commerce
  143. The process of doing business electronically. E-commerce
  144. The online transaction through mobile phones. M-commerce
  145. An electronic exchange of currency for purchasing goods and services. Electronic Payment (E-payment)
  146. An artificial environment created by computer system that appears real. Virtual Reality (VR)
  147. The act of making financial transaction on a mobile device. Mobile Banking
  148. The process of conducting financial transactions through internet. Online Banking
  149. The transaction between government to employee. G2E (Government-to-Employee)

 

Sunday, February 1, 2026

SEE OLD QUESTION SOLUTION: SET WISE SOLUTION


SET 1: CDC MODEL SET 2076

Group ‘A’

1. Answer the following questions in one sentence:
a) What is search engine?

Ans: A search engine is an online tool that helps users find information on the internet using keywords or phrases, and provides relevant results.
b) What is the business done through the internet?

Ans: E-commerce is the business done through the internet.
c) Which data type is used to store numeric characters or special symbols in MS-Access?

Ans: Text (Short Text) data type is used to store numeric characters or special symbols in MS-Access.
d) Which view is used to modify a table in MS-Access?

Ans: Design View is used to modify a table in MS-Access.
e) What is modular programming?

Ans: Modular programming is a programming technique which divides program into many small logical, manageable and functional modules or blocks.
f) Write any two features of C language.

Ans: Any two features C language are as follows:
a) C is a structured programming language.

b) C is a simple and portable (machine-independent) language.


2. Write appropriate technical term for the following:
a) Law that governs the legal issues of cyberspace.    Ans: Cyber Law
b) The smallest unit to represent information on a quantum computer.              Ans: Qubit

 

3. Write the full form of the following:
a) STP: Shielded Twisted Pair
b) WAP: Wireless Application Protocol

 

Group ‘B’

4. Answer the following questions:
a) What is computer network? Enlist any two advantages of it.

Ans: Computer network is a group of two or more computers and devices connected to each other through wired or wireless media to exchange data and information and share hardware, software and other resources.

Any two advantages of computer network are:

1. A network connected computers can share hardware devices such as scanner, printer, hard disk, etc.

2. It can communicate and share information all over the world through Internet.
b) What is computer ethics? Write any two of them.

Ans: Computer ethics is a set of moral principles and guidelines that govern the responsible and proper use of computers and computer software. Any two commandments (provisions) of computer ethics are:

1. Should not use a computer to harm other people.

2. Should not use a computer to publish fake information.
c) What is software security? Write any two measures of hardware security.

Ans: Software security is the protection of computer programs and applications from threats, such as hacking, virus attacks, and unauthorized access, to ensure their confidentiality, integrity, and availability.

Any two measures of hardware security are:
a) Regular Maintenance and Dust free environment

b) Power Protection device (Volt guard, Spike guard, UPS)
d) What is M-commerce? Write its two important services.

Ans: M-commerce is the process of buying and selling goods and services through mobile devices like smartphones and tablets. The two important services of m-commerce are:
a) Mobile Shopping: Buy products or services directly from mobile apps like Daraz, Hamrobazar, or Amazon.
b) Mobile Payments: Make payments using mobile apps like eSewa or Khalti.
e) What is IoT? Write any two importance of it.

Ans: Internet of Things (IoT) is a network of interconnected physical devices that can collect and exchange data over the internet without requiring human intervention. Any two importance of IoT are:

1. IoT increases automation and efficiency.

2. It provides real-time data for smart decisions.
f) What is database? Give any two examples.

Ans: Database is a collection of systematically organized inter-related data which store, manage, and retrieve data.

Any two examples of database are: Dictionary and Marks Ledger.
g) What is primary key? Write any two advantages of it.

Ans: Primary key is a field or set of fields that uniquely identifies each record in a database table.

Any two advantages of primary key are:
a) It identifies each record of a table uniquely.
b) It reduces and control duplication of records in a table.
h) What is data sorting? Write any two advantages of using it.

Ans: Data sorting is the process of arranging all the records in a table either ascending or descending order based on one or more fields. Any two advantages of using data sorting are:

1. It makes it easier to find records quickly.

2. It helps to analyse and compare data efficiently.
i) What types of work is done in MS-Access using Form and query object?

Ans: Form is used in MS Access to provide graphical interface to view, modify and add data in a table or multiple linked tables.

Query is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

 

5. Write down the output of the given program. (Show with dry run in table).

DECLARE SUB SHOW(A)

CLS

N=87

CALL SHOW(N)

END

SUB SHOW(A)

DO

B=A MOD 6+3

IF B MOD 4=0 THEN GOTO AA

PRINT B;

AA:

A=A-10

LOOP WHILE A>=50

END SUB

Ans: Dry run table:

A(N)

B =A MOD 6+3

Is B MOD 4=0?

PRINT B;

A=A-10

WHILE A>=50

87

87 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

87-10=77

77>=50 yes

77

77 MOD 6 + 3 =8

5+3=8

8 MOD 4=0

0=0YES

 

77-10=67

67>=50 yes

67

67 MOD 6 + 3=4

1+3=4

4 MOD 4=0

0=0 YES

 

67-10=57

57>=50 yes

57

57 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

57-10=47

47>=50 no

(Loop Exits)

The output of a program is:

6    6

 

6. Re-write the given program after correcting the bugs:

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR OUTPUT AS #1

AA:

INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn

INPUT #2, Nm$, Cl, Rn

INPUT “More records”; Y$

IF UCASE$(Y$)=”Y” THEN GOTO aa

CLOSE “Record.dat”

END

Ans: Debugged program:

REM to add record in an existing file

CLS

OPEN “Record.Dat” FOR APPEND AS #1

AA:

INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn

WRITE #1, Nm$, Cl, Rn

INPUT “More records”; Y$

IF UCASE$(Y$)=”Y” THEN GOTO AA

CLOSE #1

END

 

7. Study the following program and answer the given questions:
(2×1=2)

basic

OPEN “Detail.dat” FOR INPUT AS #1

OPEN “Temp.dat” FOR OUTPUT AS #2

INPUT “Enter name of the students”; S$

FOR I=1 TO 10

    INPUT #1, Nm$, Cl, A

    IF S$ <> Nm$ THEN

        WRITE #2, Nm$, Cl, A

    END IF

NEXT I

CLOSE #1, #2

KILL “Detail.dat”

NAME “Temp.dat” AS “Detail.dat”

END

a) What is the main objective of the program given above?

Ans: The main objective of the program given above is to delete the record according to the entered name.
b) Do you get any problem in the above program if the “Kill” statement is removed? Give reason.

Ans: Yes, the program will display the error message and it won’t delete the record.

 

Group ‘C’

8. Convert / Calculate as per the instruction: 
a)  
b) 
c) 
d) 

Ans:

a) CD₁₆                             b) 1000001100₂
c) 110001₂                      d) Quotient = 100₂, Remainder = 10₂

 

9. Answer the following: (4×2=8)
a) Write a program in QBASIC that asks length, breadth and height of a room and calculates its area and volume. Create a user-defined function to calculate area and a sub-program to calculate volume.
Hint: 

DECLARE FUNCTION AREA(L,B)

DECLARE SUB VOL(L,B,H)

CLS
INPUT “Enter Length”; L

INPUT “Enter Breadth”; B

INPUT “Enter Height”; H

PRINT “Area of room=”; AREA(L,B)

CALL VOL(L,B,H)

END

 

FUNCTION AREA(L,B)

AREA = L * B

END FUNCTION

 

SUB VOL(L,B,H)

V=L*B*H

PRINT “Volume of Room=”; V

END SUB

 

b) A sequential data file called “Record.txt” has stored data under the field headings: 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

CLS

WHILE NOT EOF(1)

INPUT #1, R, N$, G$, E, N, M, C

IF UCASE$(G$)=”F” AND C>=90 THEN

PRINT "Roll No:";R N$; G$; E; N; M; C

PRINT "Name:";N$

PRINT "Gender:";G$

PRINT "Marks in English:";E

PRINT "Marks in Nepali:";N

PRINT "Marks in Maths:";M

PRINT "Marks in Computer:";C

END IF

WEND

CLOSE #1

END

 

10. Write a program in C language that asks a number and checks whether it is odd or even.

#include<stdio.h>

int main( )

{

      int a;

      printf(“Enter any number”);

      scanf(“%d”, &a);

      if (a %2==0)

      printf("It is EVEN");

      else

      printf("It is ODD");

      return 0;

 }

OR

Write a program in C language to display the series with their sum:  up to 10th term.

#include <stdio.h>

int main() 

{

int i,a=1,s=0;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    s=s+a;

    a=a+1;

}

printf("The sum is %d",s);

return 0;

}

 

 

SET 2: PABSON 2081-A

Group "A"

1. Answer the following questions in one sentence:

a. What is web browser?

Ans: A web browser is a software application that allows users to access, retrieve, and view websites on the Internet.

b. What is the business conducted through wireless handheld device?

Ans: The business done through the mobile is M-Commerce.

c. Which data type is used to video file in MS-Access?

Ans: OLE Object data type is used to store video file in MS-Access.

d. What is Filtering?

Ans: Filtering is the process of viewing required record of a table that matches the specifies criteria.

e. Write difference between function procedure and sub procedure.

Ans: A function procedure returns a value to the calling module, while a sub procedure does not return any value to the calling module.

f. Write any two header files of C language.

Ans: Two header files of C language are stdio.h and math.h.

 

2. Write appropriate technical term for the following:

a. It is the act of copying someone else's work and publishing it as your own work. Ans: Plagiarism

b. The process of converting original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ans: Encryption

 

3. Write the full form of the following:

a. ASCII: American Standard Code for Information Interchange

b. MAC: Media Access Control

 

Group "B"

4. Answer the following questions:

a. Define computer network. List the types of computer network.

Ans: Computer network is a group of two or more computers and devices connected to each other through wired or wireless media to exchange data and information and share hardware, software and other resources.

The main three types of computer network are:

1.       LAN (Local Area Network)

2.       MAN (Metropolitan Area Network)

3.       WAN (Wide Area Network)

b. What is cyber ethics? List any two of them.

Ans: Cyber ethics is a set of moral principles and guidelines that govern the responsible and safe use of computers, internet and digital technologies.

Any two examples of cyber ethics are:
a) Do not use the internet to cyberbully or to spread false information online.
b) Don't use the Internet to download or share copyrighted material.

c. What is computer security? Write any two measures of hardware security.

Ans: Computer security refers to the protection of computer systems, networks, and data from unauthorized access, theft, damage, or disruption. Any two measures of hardware security are:
a) Regular Maintenance and Dust free environment

b) Power Protection device (Volt guard, Spike guard, UPS)

d. What is m-computing? Write advantages of m-computing.

Ans: Mobile computing is necessary in the present time because it allows people to access information and communicate anytime and anywhere using mobile devices. Advantages of mobile computing are:

a) It allows people to work and communicate from anywhere at any time.

b) It increases the productivity of users by reducing time and cost.

e. What is VR? Write two application areas of VR.

Ans: Virtual Reality is the use of computer technology to create a simulated environment that feels like a real world to the user. Any two application areas of Virtual Reality are:

1. Gaming and entertainment

2. Education and training

f. What is query? List its types.

Ans: Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Types of query are:

1. Select Query

2. Action Query (Append, Update, Delete and Make Table)

g. Define filtering. Write two examples of it.

Ans: Filtering is the process of viewing required record of a table that matches the specifies criteria. Examples of filtering are:
a) Display all students whose grade is 'A'.
b) Show all employees whose salary is greater than 30,000.

h. Define primary key. Write any two advantages of it.

Ans: Primary key is a field or set of fields that uniquely identifies each record in a database table.

Any two advantages of primary key are:
a) It identifies each record of a table uniquely.
b) It reduces and control duplication of records in a table.

i. What is field and database.

Ans: A field is a single column in a table that stores one type of information about all records.

A database is a collection of systematically organized inter-related data which store, manage, and retrieve data.

 

5. Write down the output of the given program. Show with dry run-in table.

CLS

P=1: Q=1

CALL DISP(P,Q)

END

SUB DISP(M,N)

WHILE (N<=5)

PRINT M

M=M*10+N

N=N+1

WEND

END SUB

Ans: 

P

Q

M

N

N<=5

PRINT M

M=M*10+N

N=N+1

1

1

1

1

1<=5 Yes

1

1x10+1

11

1+1=2

 

 

11

2

2 <=5 Yes

11

11*10+2

112

2+1=3

 

 

112 

3

3<=5 Yes

112

112*10+3

1123

3+1=4

 

 

 1123

4

4<=5 Yes

1123

1123*10+4

11234

4+1=5

 

 

 11234

5

5<=5 Yes

11234

11234*10+5

112345

5+1=6

 

 

 112345

6

6<=5 No

Loop Exits

 

 

 

The output of the program is:

1

11

112

1123

11234

 

6. Re-write program after correcting the bugs:

REM To display some records from data file "info.dat"

CLS

OPEN "MARKS.DAT FOR INPUT AS #1

PRINT "Roll , "Name", "English", "Nepali", "Maths"

DO WHILE NOT EOF()

INPUT #1,RN,N$,E,Ne,M

PRINT R,N$,E,Ne,M

END WHILE

CLOSE #1

END

Ans:

Debugged Program:

REM To display some records from data file "info.dat"

CLS

OPEN "INFO.DAT FOR INPUT AS #1

PRINT "Roll ,  "Name", "English", "Nepali", "Maths"

DO WHILE NOT EOF(1)

INPUT #1,RN,N$,E,Ne,M

PRINT RN,N$,E,Ne,M

LOOP

CLOSE #1

END

 

7. Study the following program and answer the given questions:

DECLARE SUB TEST (A, B, C)

LET X=4

LET Y=7

LETZ=12

CALL TEST (X, Y, Z)

PRINT X, Y, Z

END

SUB TEST (A, B, C)

A=A+3

B-B+2

SUM=A+B+C

PRINT SUM

END SUB

a. List the arguments and parameters used in the above program.

Ans:    The arguments are: X, Y and Z

            The parameters are: A, B, C

 b. List local variables used in each module.

Ans:   The local variables used in main module are X, Y and Z

           The local variables used in sub procedure are: A, B, C and SUM.

 

Group "C"

8. Convert/calculate as per the instruction: 

a. (10101011)2 = (?)16      Ans: (AB)16 

b. (641)10 = (?)2                 Ans: (1010000001)2

c. (1010) x (11) - (101)    Ans: (11110)2

d. (101101) /  (110)         Ans: Q = 111      R = 11

 

9. a. Write a program in QBASIC that asks for the radius and height of a cylinder and calculates its surface area and volume. Create a user-defined function to calculate the surface area and a sub-program to calculate the volume. Hint: Surface Area=2*pi*r* (r+h). Volume= pi*r^2*h]

DECLARE FUNCTION TSA(R,H)

DECLARE SUB VOL(R,H)

CLS

INPUT “ENTER THE RADIUS: ”;R

INPUT “ENTER THE HEIGHT: ”;H

PRINT “THE TSA OF CYLINDER: ”;TSA(R,H)

CALL VOL(R,H)

END

FUNCTION TSA(R,H)

A = 2*3.14*R*(R+H)

TSA = A

END FUNCTION

SUB VOL(R,H)

V = 3.14*R^2*H

PRINT “THE VOLUME OF CYLINDER: ”; V

END SUB

 

b. A sequential data file called "Employee.txt" has stored data under the field headings Employee ID, Name, Gender, Department, and Salary. Write a program to display all the information of those employees whose salary is greater than 50,000 and the department is "IT". 

OPEN " Employee.txt " FOR INPUT AS #1

CLS

WHILE NOT EOF (1)

INPUT #1, ID, N$, G$, D$, S

IF UCASE$(D$) = “TT” AND S>50000 THEN 

PRINT "Employee ID:"; ID

PRINT "Name:"; N$

PRINT "Gender:"; G$

PRINT "Department:"; D$

PRINT "Salary:"; S

END IF

WEND

CLOSE #1

END

 

10. Write a program in C language that asks three integer number and display smallest among three numbers.

#include<stdio.h>

int main()

{

int a,b,c;

printf("Enter 1st number:");

scanf("%d" , &a);

printf("Enter 2nd number:");

scanf("%d" , &b);

printf("Enter 3rd number:");

scanf("%d" , &c);

if(a<b && a<c)

printf("The smallest number is %d", a);

else if(b<a && b<c)

printf("The smallest number is %d", b);

else

printf("The smallest number is %d", c);

return 0;

}

OR

Write a program in C language to display reverse of an multi digit integer input number.

#include<stdio.h>

int main()

{

int n, s, r;

s=0;

printf("Enter any number: ");

scanf("%d", &n);

while(n>0)

{

    r=n%10;

    s=s*10+r;

    n=n/10;

}

printf("Reverse digits= %d",s);

return 0;

}

 

 

SET 3: PABSON 2081-B

Group A

1. Answer the following questions in one sentence

a) Write the different architecture of computer network.

Ans: The three types of network architecture are: Peer to Peer Network, Client-Server Network and Centralized Network.

b) What is Cyber bullying?

Ans: Cyberbullying refers to harassment or bullying that takes place through electronic devices and digital platforms, such as the internet, social media, or messaging apps.

c) Write any two services provided by Internet.

Ans: Any two services provided by Internet are E-mail and E-Commerce.

d) Which query is used to make change the data present in the database.

Ans: Action Query (Update Query) is used to make changes in data stored in the database.

e) What is Primary Key?

Ans: Primary key is a field or set of fields that uniquely identifies each record in a database table.

f) Write any two types of operators used in C language.

Ans: Any two operators used in C language are relational operator {E.g.: greater than (>), less than (<)} and arithmetic operator {E.g.: addition (+), subtraction (-)}

 

2. Write appropriate technical term for the following:

a) Law that governs the legal issues of cyberspace. Ans: Cyber Law

b) The website that search documents for specified keywords in Internet. Ans: Search Engine

 

3. Write the full form of the following:

a)      POP:  Post Office Protocol

b)      ISP:  Internet Service Provider

 

Group B

4. Answer the following questions:

a) Differentiate between LAN and MAN.

Ans: The difference between LAN and MAN are:

LAN (Local Area Network)

MAN (Metropolitan Area Network)

A LAN is a network that connects computers and devices within a small area such as a home, office, or school.

A MAN is a network that connects computers and devices across a city or metropolitan area, linking multiple LANs.

Example: Computer lab network, cybercafé network.

Example: Cable TV network, DSL telephone network.

b) What is network topology? Write about star topology with suitable diagram.

Ans: Network topology is the physical or logical arrangement of computers and other network devices in a computer network. It is the inter-connected pattern of network components. Diagram draw yourself

c) Write any four opportunities and threats in social media opportunities threats.

Ans: Any four opportunities (advantages) of social media are:

1. It allows people to connect easily across the world.

2. It helps in sharing information and ideas quickly.

3. It is useful for business promotion and marketing.

4. It provides a platform for learning and news updates.

Any four threats (disadvantages) of social media are:

1. It can be used to spread false information or rumours.

2. It may lead to cyberbullying and harassment.

3. It can waste time and reduce productivity.

4. Personal information can be misused or stolen.

d) What is Online Payment? Write the different forms of e-payment in Nepal.

Ans: Online payment refers to the payment for buying goods or services through the Internet using different online payment gateway. The different forms of e-payment in Nepal are: Credit Cards, Debit Cards , EFTPOS (Electronic Fund Transfer at Point of Sale), Internet Banking, Mobile Banking, and Digital Wallets: eSewa, Khalti, IME Pay, etc.

e) What is cloud computing? What are the services provided by cloud computing.

Ans: Cloud Computing is a technology that allows users to access and manage computing resources such as servers, storage and applications over the internet. The services provided by cloud computing are:

a) Infrastructure as a Service (IaaS)

b) Software as a Service (SaaS)

c) Platform as a Service (PaaS)

f) Define Data and Information.

Ans: Data is raw facts and figures that have not been processed or organized. It has no context or meaning by itself.
Example: Diya, 1000, account, balance, etc.

Information is processed and organized data that is meaningful. It has context or meaning.
Example: Diya has 1000 balance in her bank account.

g) What is MS-Access? Write the features of MS-Access.

Ans: MS-Access (Microsoft Access) is a Database Management System (DBMS) developed by Microsoft that is used to store, manage, and retrieve data in an organized way.

Any four features of MS-Access are:
a) It allows the creation of relational databases.
b) It provides forms for easy data entry.
c) It enables queries to retrieve and analyse data.
d) It generates reports for data presentation.

h) Define action query.

Ans: Action query is a type of query used to make changes to data in one or more tables. It can add, update, delete, or create records instead of just displaying them. The different types of query are: delete query, update query, append query and make table query.

i) What is table? Write the basic components of table.

Ans: A table is a collection of related data organized in rows and columns in a database. Database is composed of one or more tables. The components of table are field(column) and record(row)

5. Write down the output of the given program. Show with dry run in table.

DECLARE SUB TEST(A$)

CLS

A$="PABSON"

CALL TEST(A$)

END

SUB TEST(A$)

FOR 1=1 TO LEN(A$)

B$ = MID$(A$, I, 1)

C$=C$+B$

NEXT I

PRINT C$

END SUB

Ans: Dry Run Table:

A$

I = 1 TO LEN(A$)

B$ = MID$(A$, I, 1)

C$=C$+B$

PRINT C$

PABSON

1 TO 6 Yes

P

P

2 TO 6 Yes

A

P+A=PA

3 TO 6 Yes

B

PA+B=PAB

4 TO 6 Yes

S

PAB+S=PABS

5 TO 6 Yes

O

PABS+O=PABSO

6 TO 6 Yes

N

PABSO+N=PABSON

7 TO 6 No

(Loop Exits)

PABSON

The output of the program is:

PABSON

 

6. Rewrite the given program after correcting the bugs.

REM to display the data from sequential data file "marks.dat” having marks in english more than 35

CLS

OPEN “marks.dat” FOR OUTPUT AS#1

WHILE NOT EOF(2)

INPUT #1, N$, ENG, NEP, SCI

ENG+NEP+SCI = TOT

IF TOT >35 THEN PRINT N$, ENG, NEP, SCI

NEXT

CLOSE #1

END

Debugged Program:

REM to display the data from sequential data file "marks.dat” having marks in English more than 35

CLS

OPEN “marks.dat” FOR INPUT AS#1

WHILE NOT EOF(1)

INPUT #1, N$, ENG, NEP, SCI

TOT = ENG+NEP+SCI

IF ENG >35 THEN PRINT N$, ENG, NEP, SCI

WEND

CLOSE #1

END

 

7. Study the following program and answer the given questions:

DECLARE FUNCTION GRADE (A)

CLS

INPUT "ENTER A NUMBER"; B

C=GRADE(B)

PRINT C

END

FUNCITON GRADE(X)

WHILE X< >0

R = X MOD 10

Z = Z + R

X = INT(X/10)

WEND

GRADE=Z

END SUB

a) How many parameters are used in the above program?

Ans: One parameter is used in the above program.

        Note: A and X is formal parameter and B is actual parameter. 

b) List the different library functions used in the program.

Ans: The library functions used in the program is INT().

 

Group C

8. Convert/calculate as per the instruction:

a) (111)10 into (Binary)                 Ans: (1101111)2

b) (212)8 into (Hexadecimal)       Ans: (8A)16

c)11001-10101                 Ans: 101110

d) 100101 / 1100             Ans: Q = 11        R = 1

9. a) Write a program in QBasic that ask to enter three different numbers then find out Product and Average. Create  
       a user defined function PROD( ) to calculate product and sub procedure AVG( ) to calculate average.

            DECLARE FUNCTION PROD(A, B, C)

            DECLARE SUB AVG(A, B, C)

            CLS

            INPUT “Enter first number:”; A

            INPUT “Enter second number:”; B

            INPUT “Enter third number:”; C

            PRINT “Product of three numbers:”; PROD(A, B, C)

            CALL AVG(A, B, C)

            END

            

            FUNCTION PROD(A, B, C)

            P = A * B * C

            PROD=P

            END FUNCTION

            

            SUB AVG(A, B, C)

            AV=(A+B+C)/3

            PRINT “Average of three numbers:”; AV

            END SUB

b) A sequential data file called "data.dat" has stored data under the field heading item name, quantity and rate. Write a program to display all the records with total.

OPEN "data.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

    INPUT #1, N$, Q, R

    T = Q * R

    PRINT “Item Name:”;N$

    PRINT “Quantity:”;Q

    PRINT “Rate:”;R

    PRINT “Total:”;T

WEND

CLOSE #1

END

Next Method:

OPEN “data.dat” for INPUT AS #1

CLS

PRINT “Name”, “Quantity”, “Rate”, “Total”

WHILE NOT EOF(1)

  INPUT #1, N$, Q, R

  T = Q * R

  PRINT N$, Q, R, T

WEND

CLOSE #1

END

 

10. Write a program in C language to ask to enter a number then find out whether it is even or odd.

#include<stdio.h>

void main()

{

int n;

printf("Enter any number: ");

scanf("%d", &n);

if(n%2= =0)

{

printf("%d is even number", n);

}

else

{

printf("%d is odd number", n);

}

return 0;

}

 

OR

Write a C program to display the series 1, 4, 9. up to 10th term.

#include <stdio.h>

int main() 

{

int a = 1, i;

for (i = 1; i <= 10; i++)

{

        printf("%d ", a*a);

        a=a+1;

}

return 0;

}

 

 

Set 4: NPABSON - 2081 (Kaski)

Group ‘A’

1. Answer the following questions in one sentence:

a.    What is search engine?

Ans: A search engine is an online tool that helps users find information on the internet using keywords or phrases, and provide relevant results.

b.   What is business done through the mobile?

Ans: The business done through the mobile is M-Commerce.

c.    Which view is used to modify a table structure in MS-Access?

Ans: The Design View is used to modify the structure of a table.

d.   Write any two objects of MS-Access.

Ans: Any two objects of MS-Access are: Table and Query.

e.    Write any two features of C-language.

Ans: Any two features C language are as follows:
a) C is a structured programming language.

b) C is a simple and portable (machine-independent) language.

c) C provides fast execution and efficient performance.

f.     What is modular programming?

Ans: Modular programming is a programming technique which divides program into many small logical, manageable and functional modules or blocks.

 

2. Write appropriate technical term for the following:

a. A company which provides services of Internet.            Ans: Internet Service Provider (ISP)
b. Computer program that protects computer from computer virus.              Ans: Antivirus software

 

3. Write the full forms of following:

a. G2B: Government to Business
b. POP: Post Office Protocol

 

Group ‘B’

4. Answer the following questions:

a. What is computer Network? List any two importance of it.

Ans: Computer network is a group of two or more computers and devices connected to each other through wired or wireless media to exchange data and information and share hardware, software and other resources.

Any two importance (advantages) of computer network are:

1. A network connected computers can share hardware devices such as scanner, printer, hard disk, etc.

2. It can communicate and share information all over the world through Internet.
b. What is e-commerce? Write two features of e-commerce.

Ans: E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Any two features (advantages) of e-commerce are:

1. Shop 24/7 from anywhere with Internet access.

2. Easily compare products, prices, and reviews.
c. What is IoT? Write any two importance of it.

Ans: Internet of Things (IoT) is a network of interconnected physical devices that can collect and exchange data over the internet without requiring human intervention. Any two importance of IoT are:

1. IoT increases automation and efficiency.

2. It provides real-time data for smart decisions.
d. What is primary key? Write its features.

Ans: Primary key is a field or set of fields that uniquely identifies each record in a database table.

Any two features of primary key are:

1. Uniqueness: All values must be unique.

2. No Null Values: No value should be empty (NULL).
e. What is data sorting? Write its two advantages.

Ans: Sorting is the process of arranging all the records in a table either ascending or descending order based on one or more fields. Any two advantages of sorting are:

i) It makes it easier to find records quickly.

ii) It helps to analyse and compare data efficiently.
f. Define form. Write any two uses of it.

Ans: Form is one of the MS-Access database objects which provides graphical interface to view, modify and add data in a table or multiple linked tables. Any two uses of form are:

1. It is used to enter new records into a table.

2. It is used to view or update existing records.
g. What is Topology? Draw the figure of star topology.

Ans: Network topology is the physical or logical arrangement of computers and other network devices in a computer network. It is the inter-connected pattern of network components.
h. What is virtual reality? List any two application areas of it.

Ans: Virtual Reality is the use of computer technology to create a simulated environment that feels like a real world to the user. Any two application areas of Virtual Reality are:

1. Gaming and entertainment

2. Education and training
i. What is database? Give any two examples.

Ans: A database is a collection of systematically organized inter-related data which store, manage, and retrieve data.

Any two examples of database are: Dictionary and Telephone Directory

 

5. Write the output of the given program with a dry run table.

Declare SUB xyz(N$)

CLS

Let NS = "COMPUTER"

Call xyz(N$)

END

SUB xyz(NS)

FOR I = LEN(N$) TO 1 STEP -2

Print MID$(N$, I, 1)

Next I

END SUB

Ans: Dry Run Table:

N$

FOR I = LEN(N$) TO 1 STEP -2

MID$(NS, I, 1)

PRINT

COMPUTER

8 TO 1 YES

MID$("COMPUTER", 8, 1)

R

 

6 TO 1 YES

MID$("COMPUTER", 6, 1)

T

 

4 TO 1 YES

MID$("COMPUTER", 4, 1)

P

 

2 TO 1 YES

MID$("COMPUTER", 2, 1)

O

 

0 TO 1 NO (Loop Exits)

 

 

The output of program is:

R

T

P

O

 

6. Re-write the given program after correcting the bugs: $(2)$

Basic

CLS

Do

    Open "O", #1, "student.dat"

    Input "enter name"; N$

    Input "enter address"; A$

    Input "enter post"; P$

    Input "enter salary"; S$

    Write#1, N$, A$, P$, S

    Input "Do you need more[Y/N]"; X$

Loop while X$ = "Y" and X$ = "y"

Close

End#1

Ans: Debugged Program:

CLS

Open "O", #1, "student.dat"

DO

    INPUT "enter name"; N$

    INPUT "enter address"; A$

    INPUT "enter post"; P$

    INPUT "enter salary"; S

    WRITE #1, N$, A$, P$, S

    INPUT "Do you need more[Y/N]"; X$

LOOP WHILE UCASE$(X$) = "Y"

CLOSE #1

END

 

7. Study the following program and answer the following questions:

DECLARE SUB PAL(N)

CLS

Let N = 11011

N$ = STR$(N)

CALL PAL(N)

END

SUB PAL(N)

FOR I = LEN(N$) TO 1 step -1

    X$ = MID$(N$, I, 1)

    X = VAL(X$)

    D = D + X * 2 ^ P

    P = P + 1

Next I

Print N

Print D

END SUB

a) Write the use of VAL in the above program.

Ans: The use of VAL is to convert a string character back into a numeric value.

b) List out the library functions.

Ans: The library functions (built-in functions) used in the program are: STR$, LEN, MID$ and VAL.

 

Group 'C'

8. Convert/Calculate as per instruction:

a.
b.
c.
d.

 

9. a. Write a program in QBASIC that asks radius of a circle to calculate its area and circumference. Create a user defined function to calculate area and sub program to calculate circumference.

DECLARE FUNCTION AREA(R)

DECLARE SUB CIRCUMFERENCE(R)

CLS

INPUT "Enter the radius of the circle: ", R

PRINT "Area of the circle: "; AREA(R)

CALL CIRCUMFERENCE(R)

END

 

FUNCTION AREA(R)

A = 3.14* R * R

AREA = A

END FUNCTION

 

SUB CIRCUMFERENCE(R)

C = 2 * 3.14 * R

PRINT "Circumference of the circle: "; C

END SUB

 

b. A sequential datafile called "employee.dat" has stored data under the field heading Name, Post, Salary and E-mail. Write a program to display all the information of employees whose Post is "MANAGER" and salary is greater than 50,000.

OPEN "employee.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

    INPUT #1, N$, P$, S, E$

    IF UCASE$(P$) = "MANAGER" AND S > 50000 THEN

        PRINT "Name: "; N$

        PRINT "Post: "; P$

        PRINT "Salary: "; S

        PRINT "E-mail: "; E$

        PRINT

    END IF

WEND

CLOSE #1

END

 

10. Write a program in C-language that asks any two numbers and displays the greatest among them.

#include<stdio.h>

int main( )

{

int a,b;

printf("Enter 1st number:");

scanf("%d ", &a);

printf("Enter 2nd number:");

scanf("%d ", &b);

if(a>b)

{

printf("The greatest number is %d", a);

}

else

{

printf("The greatest number is %d", b);

}

return 0;

}

 

OR

Write a C program to display first 10 odd numbers.

#include <stdio.h>

int main() 

{

int i,a=1;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    a=a+2;

}

    return 0;

}

 

 

SET 5: PABSON 2080 (KOSHI)

Group ‘A’

1. Answer the following questions in one sentence:

a) Write the different modes of communication.
Ans: 
The different modes of communication are simplex, half-duplex, and full-duplex.

b) What is IoT?
Ans: 
Internet of Things (IoT) is a network of interconnected physical devices that can collect and exchange data over the internet without requiring human intervention.

c) List the different LAN topology.
Ans: 
The different LAN topologies are bus, star, and ring topology.

d) What is Global Variable in QBasic?
Ans: 
Variables which are declared outside the procedure and whose values can be accessed from any procedure or module are called global variables.

e) What is tuple?
Ans: 
Tuple is a single row in a table that contains all the information about one item or entity.

f) Write any two data types used in C-language.
Ans: 
The two data types used in C language are int and float.

 

2. Write appropriate technical term for the following:

a) Sending and receiving messages electronically through the Internet.   Ans: Email (Electronic Mail)

b) Services provided by the government to public via electronic media especially using Internet. 

Ans: E-Governance (Electronic Governance)

 

3. Write the full form of the following:

a) FTP: File Transfer Protocol
b) B2B: Business to Business

 

Group ‘B’

4. Answer the following questions:

a) What is computer network? Write any two advantages of computer network.
Ans: 
Computer network is a group of two or more computers and devices connected to each other through wired or wireless media to exchange data and information and share hardware, software and other resources.

Any two advantages of computer network are:

1. A network connected computers can share hardware devices such as scanner, printer, hard disk, etc.

2. It can communicate and share information all over the world through Internet.

b) List any four areas where AI can help us.
Ans: 
Any four areas where AI can help us are:
a) It helps in healthcare (diagnosis and treatment)
b) It helps in education (smart learning systems)
c) It helps in transportation (self-driving vehicles)
d) It helps in robotics and automation

c) What is digital footprint? Write any two points to reduce the size of digital footprint while using internet.
Ans: 
A digital footprint is the trail of data and information left behind by an individual's online activities which includes social media posts, website visits, online purchases, and other digital engagements.

Any two points to reduce the size of digital footprint while using internet are:
a) Unsubscribe or delete accounts and social media profiles that are no longer in use.
b) Limit what you share online: Avoid posting unnecessary personal information.

d) Mention the benefits and limitations of E-commerce.
Ans:
Benefits (Advantages) of E-Commerce are:
a) Shop 24/7 from anywhere with Internet access.
b) Easily compare products, prices, and reviews.

Limitations (Disadvantages) of E-Commerce are:
a) No personal touch; cannot physically check goods.
b) Requires Internet and devices; dependent on technology.

e) Define Encryption and Decryption.
Ans:
Encryption is the process of converting original, readable data (plaintext) into an unreadable, encoded form (ciphertext) to prevent unauthorized access. Done by the sender before sending the data.

Decryption is the reverse process of converting the unreadable ciphertext back into its original, readable plaintext form. Done by the receiver using the decryption key.

f) What is RDBMS? Write any two examples.
Ans: 
RDBMS is a type of database management system that stores data in tables and allows relationships between tables using keys. Any two examples of RDBMS are: MySQL and Microsoft Access.

g) Write the functions of Primary key.
Ans: 
The functions of Primary key are:
a) It identifies each record of a table uniquely.
b) It reduces and control duplication of records in a table.
c) It sets relationships between tables in a database.
d) It maintains data integrity by ensuring accuracy of records in a table.

h) What is query? Write its types.
Ans: 
Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition. Different types of query are: Select Query and Action Query (Update, Delete, Append, Make Table).

i) Define Form and Report.
Ans:
Form is one of the MS-Access database objects which provides graphical interface to view, modify and add data in a table or multiple linked tables.

Report is one of the MS-Access database objects used to present information in an effective and organized format that is ready for printing.

 

5. Write down the output of the given program. Show with dry run in table.

DECLARE FUNCTION PRE(A)

CLS

A = 12345

S = PRE(A)

PRINT S

END

 

FUNCTION PRE(A)

WHILE A <> 0

    R = A MOD 10

    S = S + R

    A = A \ 10

WEND

PRE = S

END FUNCTION

Ans: Dry Run Table:

A

WHILE A < >0

R = A MOD 10

S = S + R

A = A \ 10

PRINT S (PRE = S)

12345

12345<>0 YES

=12345 MOD 10
=5

=0+5=5

12345\10
=1234

-

1234

1234<>0 YES

1234 MOD 10
=4

=5+4=9

1234\10
=123

-

123

123<>0 YES

123 MOD 10
=3

=9+3=12

123\10=12

-

12

12<>0 YES

12 MOD 10
=2

12+2=14

12\10=1

-

1

1<>0 YES

1 MOD 10=1

14+1=15

1\10=0

-

0

0<>0 NO
(LOOP EXITS)

-

-

-

15

The output of the program is:

15

 

6. Re-write the given program after correcting the bugs:

REM to create sequential data file "record.dat" to delete some records.

CLS

OPEN "record.dat" FOR INPUT AS #1

OPEN "new.dat" FOR OUTPUT AS #1

WHILE NOT EOF(#1)

INPUT #1, N$, A$, PH

PRINT N$, A$, PH

INPUT "Do you want to delete this record?(y/n)"; an$

IF LCASE(an$) <> "y" THEN

WRITE #2, N$, A$, PH

END IF

WEND

CLOSE #1, #2

DEL "record.dat"

NAME "new.dat" AS "record.dat"

END

Ans: Debugged program:

REM to create sequential data file "record.dat" to delete some records.

CLS

OPEN "record.dat" FOR INPUT AS #1

OPEN "new.dat" FOR OUTPUT AS #2

WHILE NOT EOF(1)

INPUT #1 N$, A$, PH

PRINT N$, A$, PH

INPUT "Do you want to delete this record?(y/n)"; an$

IF LCASE$(an$) < > "y" then

WRITE #2, N$, A$, PH

ENDIF

WEND

CLOSE #1, #2

KILL "record.dat"

NAME "new.dat" AS "record.dat" 

END

 

7. Study the following program and answer the given questions:

DECLARE SUB TEN(A$)

B$ = "SCIENCE"

CALL TEN(B$)

END

SUB TEN(C$)

L = LEN(C$)

FOR I = 1 TO 4

    D$ = MID$(C$, I, L)

    PRINT TAB(I); D$

    L = L - 2

NEXT I

END SUB

a) How many parameters are used in the above program?
Ans: 
One parameter is used in the above program

b) List the different library functions used in the above program.
Ans: 
The different library functions used in the above program are: MID$(), LEN(), TAB().

 

8. Convert/calculate as per the instruction:

a) (11011)₂ into Decimal number

b) (2AF)₁₆ into Octal number

c) 1100 × 100 – 101 = (?)₂

d) 10001 ÷ 110
Ans:
a) (27)₁₀                                          b) (1257)₈
c) (101011)₂                      d) Quotient = 10     Remainder = 101₂

 

Group ‘C’

9. a) Write a program in QBasic that asks the radius of a hemisphere and calculates its volume and total surface area. Create a user-defined function First(r) to calculate volume and sub-procedure Second(r) to calculate total surface area. [Hints: TSA = 3πr², V = (2/3)πr³]

DECLARE FUNCTION First(r)

DECLARE SUB Second(r)

CLS

INPUT "Enter the radius of the hemisphere: ", r

PRINT "Volume of hemisphere: "; First(r)

CALL Second(r)

END

 

FUNCTION First(r)

V = (2 / 3) * 3.1416 * r ^ 3

First = V

END FUNCTION

 

SUB Second(r)

TSA = 3 * 3.1416 * r ^ 2

PRINT "Total Surface Area: "; TSA

END SUB

 

b) A sequential data file called list.dat has stored data under the field heading items name, quantity, and rate. Write a program to update all the records by increasing the rate by 10%.

OPEN "list.dat" FOR INPUT AS #1

OPEN "temp.dat" FOR OUTPUT AS #2

WHILE NOT EOF(1)

    INPUT #1, item$, quantity, rate

    rate = rate + 0.10 * rate

    WRITE #2, item$, quantity, rate

WEND

CLOSE #1, #2

KILL "list.dat"

NAME "temp.dat" AS "list.dat"

END

 

10. Write a program in C language to enter a number and find out whether it is positive or negative.

#include <stdio.h>

int main()

{

    int n;

    printf("Enter a number: ");

    scanf("%d", &n);

    if (n > 0)

        printf("The number is positive");

    else if (n < 0)

        printf("The number is negative");

    else

        printf("The number is zero");

    return 0;

}

OR

Write a C program to display the sum of first 10 natural numbers.

#include <stdio.h>

int main() 

{

int i,a=1,s=0;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    s=s+a;

    a=a+1;

}

printf("The sum is %d",s);

return 0;

}

 

 

SET 6: PABSON 2080 (Madhesh)

Group 'A'

1. Answer the following questions in one sentence:

a) What is data communication?

Ans: Data communication is the process of transferring data and information between two or more computers and devices through wired or wireless media.

b) What is computer virus?

Ans: A computer virus is malicious software that attaches itself to other programs or files and spreads to other computers which damage, corrupt, or delete data and disrupt system operations.

c) Name any two types of data file in QBasic.
Ans: 
Any two types of data file in QBasic are: Sequential Data File and Random Data File

d) What is primary key?
Ans: 
Primary key is a field or set of fields that uniquely identifies each record in a database table.

e) What is field?
Ans: 
Field is a single column in a table that stores one type of information about all records.

f) What is C language?
Ans: 
C Language is a general purpose, high-level, structured programming language developed by Dennis Ritchie at Bell Laboratories in the early 1970s.

 

2. Write appropriate technical term for the following:

a) A network limited with a room or building.     Ans: LAN (Local Area Network)

b) Commercial transaction through mobile devices.    Ans: M-Commerce (Mobile Commerce)

 

3. Write the full form of the following:

a) UPS: Uninterruptible Power Supply
b) WWW: World Wide Web

 

Group 'B'

4. Answer the following questions:

a) What is transmission media? Write its types.

Ans: A channel or path through which data and information are transmitted between connected devices in a network environment is called communication media. The two main types of communication media are:

1. Guided (Wired/bounded) communication media

2. Unguided (Wireless/unbounded) communication media

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

Ans: Internet of Things (IoT) is a network of interconnected physical devices that can collect and exchange data over the internet without requiring human intervention. Any two importance of IoT are:

1. IoT increases automation and efficiency.

2. It provides real-time data for smart decisions.
c) Write any four opportunities and threats of social media.

Ans: Any four opportunities (advantages) of social media are:

1. It allows people to connect easily across the world.

2. It helps in sharing information and ideas quickly.

3. It is useful for business promotion and marketing.

4. It provides a platform for learning and news updates.

Any four threats (disadvantages) of social media are:

1. It can be used to spread false information or rumours.

2. It may lead to cyberbullying and harassment.

3. It can waste time and reduce productivity.

4. Personal information can be misused or stolen.

d) What is E-commerce? Write its types.

Ans: E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. The types of E-Commerce Models are:

1. Business to Consumer (B2C)

2. Business to Business (B2B)

3. Consumer to Consumer (C2C)

4. Consumer to Business (C2B)

e) What is information security? Write any two ways to protect our data.

Ans: Information security refers to the protection of data and information from being accessed, changed or used by unauthorized people. It ensures that information remains confidential, accurate, and available only to people who are allowed to access it. Any two ways to protect our data are:
a) Authentication System (Password and Biometric) and Use of Antivirus software
b) Cryptography (Encryption and Decryption) and Backup System

f) What is database? Write any two examples.
Ans: 
Database is a collection of systematically organized inter-related data which store, manage, and retrieve data. Any two examples of database are: Dictionary and Marks Ledger.

g) What is table? Write the basic components of table.
Ans: 
Table is a collection of related data organized in rows and columns in a database. Database is composed of one or more tables. The basic components of table are as follows: Fields (columns) and Records (rows).

h) What is action query? Write its type.
Ans: 
Action query is a type of query used to make changes to data in one or more tables. It can add, update, delete, or create records instead of just displaying them. Different types of action query are: Append query, Update query, Delete query, and Make Table query.

i) Define input mask and validation rule.
Ans:
Input mask is a field property that controls the value of a record and sets in a specific format.
Example: Date: 00/00/0000 → Ensures the date is entered like 07/01/2026.

Validation Rule is a field property which is used to limit the values that can be entered into a field.
Example: If a field should only have numbers greater than 0, the validation rule can be set as >0.

 

5. Write down the output of the given program. Show with dry run in table.

DECLARE SUB SERIES()

CLS

CALL SERIES

END

SUB SERIES

A = 4

B = 5

PRINT A

PRINT B

FOR I = 1 TO 5

    C = A + B

    PRINT C

    A = B

    B = C

NEXT I

END SUB

Ans: Dry Run Table:

A

B

PRINT A

PRINT B

FOR C = 1 TO 5

C = A + B

PRINT C

A = B

B = C

4

5

4

5

1 TO 5 Yes

4+5=9

9

5

9

5

9

-

-

2 TO 5 Yes

5+9=14

14

9

14

9

14

-

-

3 TO 5 Yes

9+14=23

23

14

23

14

23

-

-

4 TO 5 Yes

14+23=37

37

23

37

23

37

-

-

5 TO 5 Yes

23+37=60

60

37

60

37

60

-

-

6 TO 5 No

(Loop Exits)

-

-

-

-

The output of the program is:

4

5

9

14

23

37

60

 

6. Re-write the given program after correcting the bugs:

REM add some more record on a sequential data file "emp.dat"

CLS

OPEN "emp.dat" FOR INPUT AS #1

UP:

INPUT "ENTER NAME: "; N$

INPUT "ENTER DEPARTMENT: "; D$

INPUT "ENTER POST: "; P$

INPUT "ENTER SALARY: "; SL

WRITE #2, N$, D$, P$, SL

INPUT "DO YOU WANT TO ADD MORE RECORD? (Y/N)"; ANS

IF UCASE$(ANS$) = "Y" THEN GOTO UP

CLOSE

END

Ans: Debugged Program:

REM add some more record on a sequential data file "emp.dat"

CLS

OPEN "emp.dat" FOR APPEND AS #1

UP:

INPUT "ENTER NAME:”; N$

INPUT "ENTER DEPARTMENT” ; D$

INPUT "ENTER POST”; P$

INPUT "ENTER SALARY”; SL

WRITE #1, N$, D$, P$, SL

INPUT "DO YOU WANT TO ADD MORE RECORD?(Y/N)”;  ANS$

IF UCASE$(ANS$)= "Y" THEN GOTO UP

CLOSE #1

END

 

7. Study the following program and answer the given questions:

DECLARE FUNCTION TEST$(A$)

CLS

A$ = "KATHMANDU"

B$ = TEST$(A$)

PRINT B$

END

FUNCTION TEST$(A$)

FOR I = 1 TO LEN(A$)

    D$ = MID$(A$, I, 1)

    IF I MOD 2 = 0 THEN

        C$ = C$ + UCASE$(D$)

    ELSE

        C$ = C$ + LCASE$(D$)

    END IF

NEXT I

TEST$ = C$

END FUNCTION

a) What is the name of the function procedure?
Ans: 
The name of the function procedure is TEST$().

b) List the different library functions used in the program.
Ans: 
The different library functions used in the program are: MID$(), UCASE$(), LCASE$()

 

Group 'C'

8. Convert/calculate as per the instruction:

a) (511)₁₀ into Binary number       Ans: (111111111)₂

b) (756)₈ into Hexadecimal number         Ans: (1EE)₁₆

c) 1001 × 101 – 11 = (?)₂               Ans: 101010₂

d) 1001001 ÷ 11001        Ans: Quotient = 10₂, Remainder = 10111₂

 

9. a) Write a program in QBasic that asks the radius and height of a cylinder, then calculates its volume and total surface area. Create a user-defined function VLM(r, h) to calculate volume and sub-procedure TOTSA(r, h) to calculate total surface area. [Hints: TSA = 2πr(r+h), V = πr²h]

DECLARE FUNCTION VLM(r, h)

DECLARE SUB TOTSA(r, h)

CLS

INPUT "Enter radius: "; r

INPUT "Enter height: "; h

PRINT "Volume of the cylinder: "; VLM(r, h)

CALL TOTSA(r, h)

END

 

FUNCTION VLM(r, h)

    V = 3.1416 * r * r * h

    VLM = V

END FUNCTION

 

SUB TOTSA(r, h)

    TSA = 2 * 3.1416 * r * (r + h)

    PRINT "Total Surface Area of the cylinder: "; TSA

END SUB

b) A sequential data file called "marks.dat" has stored data under the field heading student's name, Eng, Nep and Math. Write a program to display all the records whose marks are greater than 35 in all subjects.

OPEN "marks.dat" FOR INPUT AS #1 

CLS

WHILE NOT EOF(1) 

INPUT #1, N$, E, N, M 

IF E > 35 AND N > 35 AND M > 35 THEN 

PRINT “Name:”; N$

PRINT “Marks in English:”; E

PRINT “Marks in Nepali:”; N

PRINT “Marks in Math:”; M

END IF 

WEND

CLOSE #1 

END

 

10. Write a program in C language to ask to enter a number, then find out whether it is odd or even number.

#include<stdio.h>

int main( )

{

      int a;

      printf(“Enter any number”);

      scanf(“%d”, &a);

      if (a %2==0)

      printf("It is EVEN");

      else

      printf("It is ODD");

      return 0;

 }

 

 

SET 7: PABSON 2080 (Bagmati)

Group 'A'

1. Answer the following questions in one sentence.

a) Which connector is used with coaxial cable?
Ans:
BNC (Bayonet Neill-Concelman) connector is used with coaxial cable.

b) Why data decryption is necessary?
Ans:
Data decryption is necessary to convert encrypted information back into a readable form for authorized users.

c) Which data types are used to store graphics and numeric characters in MS-Access?
Ans:
OLE Object is used for graphics, and Number is used for numeric characters in MS-Access.

d) List any two objects of MS-Access.
Ans:
Any two objects of MS-Access are Table and Query.

e) What is the function of MOD in QBasic?
Ans:
The function of MOD is to find remainder when one number is divided by another.

f) Write the name of unary operators used in C language.
Ans:
The name of unary operators used in C language are: Increment (++) and Decrement (--).

 

2. Write appropriate technical term for the following:

a) The protection of computer systems and sensitive information from unauthorized access, theft or damage.
Ans: Cybersecurity

b) The Internet tool which is used to upload/download. Ans: FTP (File Transfer Protocol)

 

3. Write the full form of the following:

a) VOIP: Voice Over Internet Protocol
b) ISDN: Integrated Services Digital Network

 

Group 'B'

4. Answer the following questions:

a) What is topology? Draw the figure of star topology.
Ans:
Network topology is the physical or logical arrangement of computers and other network devices in a computer network. It is the inter-connected pattern of network components.

b) What is cyber-ethics? List out any two cybercrimes.
Ans:
Cyber ethics is a set of moral principles and guidelines that govern the responsible and safe use of computers, internet and digital technologies. Any two cybercrimes are: Hacking and Phishing.

c) What is hardware security? Write any two measures of software security.
Ans:
Hardware security is the protection of the physical components of a computer or electronic device from unauthorized access, loss, or damage. Any two measures of software security are:
a) Authentication System (Password and Biometric) and Use of Antivirus software
b) Cryptography (Encryption and Decryption) and Backup System

d) What is E-government? Give any two examples.
Ans:
E-governance is the use of information and communication technology (ICT) by the government to provide services and information to citizens electronically. Any two examples of e-governance services in Nepal are:
a) Online PAN registration system
b) Online passport application system

e) Define cloud computing with example.
Ans:
Cloud Computing is a technology that allows users to access and manage computing resources such as servers, storage and applications over the internet. Example: Google Drive, Dropbox, Amazon Web Services (AWS), etc.

f) Differentiate between Database and DBMS.
Ans:
The differences between database and DBMS are as follows:

Database

DBMS

A database is a collection of systematically organized inter-related data which store, manage, and retrieve data.

A DBMS (Database Management System) is a software that allows users to store, manage, and retrieve data in an organized way.

Example: Dictionary, Marks Ledger, Telephone Directory

Example: Microsoft Access, MySQL, Oracle, SQL Server

It only stores data.

It manages, controls, and manipulates data.

g) What is primary key? Write its importance.
Ans:
Primary key is a field or set of fields that uniquely identifies each record in a database table.

Importance of Primary key are as follows:
a) It identifies each record of a table uniquely.
b) It reduces and control duplication of records in a table.
c) It sets relationships between tables in a database.
d) It maintains data integrity by ensuring accuracy of records in a table.

h) What is data type? List any two data types of MS-Access.
Ans:
Data type is a property in MS-Access which is used to define the kind of data that a field can store, such as text, numbers, dates, or objects. Any two data types of MS-Access are: Text (Short Text) and Number.

i) Why update query is necessary in Database system? Give reason.
Ans:
Update Query is necessary in a database system because of the following reasons:

1.       It is used to modify or correct existing data in a table.

2.       It helps to keep the database accurate and up to date.

 

5. Write down the output of the given program. Show with dry run in table.

DECLARE SUB show()

CLS

CALL show

END

SUB show

FOR I = 1 TO 7 STEP 3

    S = S + I ^ 3

NEXT I

PRINT S

END SUB

Ans: Dry Run Table:

S

FOR I = 1 TO 7 STEP 3

S = S + I ^ 3

PRINT S

0

1 to 7 step 3 Yes

0 + 1³ = 1

-

1

4 to 7 step 3 Yes

1 + 4³ = 65

-

65

7 to 7 Yes

65 + 7³ = 408

-

408

10 to 7 No (Loop Exits)

Loop exits

408

The output of the program is: 408

 

6. Re-write the given program after correcting the bugs:

REM display records of students from sequential data file.

OPEN "STUDENT.DAT" FOR INP AS #1

PRINT "SNO", "NAME", "ADDRESS", "CLASS", "SECTION"

WHILE NOT EOF

    INPUT #1, SN, N$, AD$, C, SE$

    PRINT SN, N$, AD$, C, SE$

NEXT

CLOSE #1

STOP

Ans: Debugged Program:

OPEN “STUDENT.DAT” FOR INPUT AS #1

PRINT “SNO”, “NAME”, “ADDRESS”, “CLASS”, “SECTION”

WHILE NOT EOF(1)

INPUT #1, SN, N$, AD$, C, SE$

PRINT SN, N$, AD$, C, SE$

WEND

CLOSE #1

END

 

7. Study the following program and answer the questions.

DECLARE FUNCTION num(N)

FOR I = 1 TO 5

    READ N

    Z = num(N)

    S = S + Z

NEXT I

PRINT S

DATA 11, 14, 16, 5, 7

END

FUNCTION num(N)

IF N MOD 2 = 0 THEN num = N

END FUNCTION

a) List the library function used in the above program.
Ans:
No library function is used in the program.

b) Write the name of the function used in the above program.
Ans:
The name of the function used in the above program is  num()

 

Group 'C'

8. Convert/calculate as per the instruction:

a) (101110111)₂ = (?)₈    Ans: (567)₈

b) (248)₁₀ = (?)₂     Ans: (11111000)₂

c) (1101)₂ × (110)₂ – (1011)₂ = (?)₂    Ans: (1000011)₂

d) (1011101)₂ ÷ (101)₂     Ans: Quotient = 10010₂, Remainder = 11₂

 

9. a) Write a program in QBASIC to print circumference of a circle using SUB and volume of a cylinder using FUNCTION.

DECLARE SUB Circum(R)

DECLARE FUNCTION Volume(R, H)

CLS

INPUT "Enter radius of the circle: ", R

INPUT "Enter height of the cylinder: ", H

CALL Circum(R)

PRINT "Volume of cylinder: "; Volume(R, H)

END

 

SUB Circumference(R)

    C = 2 * 22 / 7 * R

    PRINT "Circumference of the circle: "; C

END SUB

 

FUNCTION Volume(R, H)

    VC= 22 / 7 * R ^ 2 * H

    Volume = VC

END FUNCTION

 

b) A sequential data file “Employee.dat” has some records with fields serial number, name, address, post and salary for the number of employees. Write a program to display all the records of those employees whose salary is more than Rs. 50000.

OPEN "Employee.dat" FOR INPUT AS #1

WHILE NOT EOF(1)

    INPUT #1, SN, N$, A$, P$, S

    IF S > 50000 THEN

        PRINT “Serial Number:” SN$       

        PRINT “Name:” N$

        PRINT “Address:” A$

        PRINT “Post:” P$

        PRINT “Salary:” S

    END IF

WEND

CLOSE #1

END

 

10. Write a program to read any three integer numbers from the keyboard and find the smallest number using C language.

#include <stdio.h>

int main() 

{

int a, b, c;

printf("Enter 1st number:");

scanf("%d ", &a);

printf("Enter 2nd number:");

scanf("%d ", &b);

printf("Enter 3rd number:");

scanf("%d ", &c);

    if (a < b && a < c)

        {

        printf("The smallest number is %d", a);

        }

    else if (b < a && b < c)

       {

        printf("The smallest number is %d", b);

       }

    else

       {

        printf("The smallest number is %d", c);

       }

    return 0;

}

OR
Write a program to print first 10 natural numbers using C language.

#include <stdio.h>

int main() 

{

int i,a=1;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    a=a+1;

}

    return 0;

}

 

 

SET 8: PABSON 2080 (Gandaki)

Group 'A'

1. Answer the following questions in one sentence.

a) What is e-banking?
Ans:
E-banking refers to performing banking transactions online using the internet.

b) What is mobile computing?
Ans:
Mobile computing refers to the use of portable devices like smartphones, tablets, and laptops to access and share information from anywhere, without being tied to a specific location.

c) Give any two examples of DBMS.
Ans:
Any two examples of DBMS are: Ms Access and MySQL.

d) Which view of Ms Access helps us to modify table?
Ans:
Design View of MS Access helps us to modify a table.

e) Write down the types of modular programming.
Ans:
Sub Procedure and Function Procedure are the types of modular programming.

f) Write any two names of data types used in C programming language.
Ans:
Any two data types used in C are int and float.

 

2. Write appropriate technical terms for the following.

a) A device that connects two dissimilar networks.           Ans: Gateway

b) The technology to encode file or message.                    Ans: Encryption

 

3. Write the full forms of the following:

a) ISDN: Integrated Services Digital Network
b) STP: Shielded Twisted Pair

 

Group 'B'

4. Answer the following questions:

a) What is browser? Give any two examples of browser.
Ans:
A web browser is a software application that allows users to access, retrieve, and view websites on the Internet. Two examples are Google Chrome and Mozilla Firefox.

b) Define digital footprint. How can you manage your digital footprint?
Ans:
A digital footprint is the trail of data and information left behind by an individual's online activities which includes social media posts, website visits, online purchases, and other digital engagements.

Any two ways to manage your digital footprint are:
a) Unsubscribe or delete accounts and social media profiles that are no longer in use.
b) Limit what you share online: Avoid posting unnecessary personal information.

c) What is software security? Write any two principles of information security?
Ans:
Software security is the protection of computer programs and applications from threats, such as hacking, virus attacks, and unauthorized access, to ensure their confidentiality, integrity, and availability.

Any two key principles of information security are:
a) Confidentiality: Only authorized users can access the data resources and information.
b) Integrity: Only authorized users should be able to modify the data when needed.

d) What is E-commerce? Write any two advantages of E-commerce.

Ans: E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Any two advantages of E-commerce are:
a) Shop 24/7 from anywhere with Internet access.
b) Easily compare products, prices, and reviews.

e) What is contemporary technology? Write any two advantages of cloud computing.
Ans:
Contemporary Technology is the Technology that is modern and currently used in everyday life, which makes our life easier and faster. Any two advantages of cloud computing are:

1. It reduces the cost of hardware and maintenance.

2. It provides easy access to data and applications from anywhere using the internet.

f) Differentiate between data and information with examples.

Data

Information

Data is raw facts and figures that have not been processed or organized. It has no context or meaning by itself.

Information is processed and organized data that is meaningful. It has context or meaning.

Example: Diya, 1000, account, balance, etc.

Example: Diya has 1000 balance in her bank account.

g) What is RDBMS? Write any two examples of it.
Ans:
RDBMS is a type of database management system that stores data in tables and allows relationships between tables using keys. Any two examples of RDBMS are: MySQL and Microsoft Access.

h) What is key in DBMS? Write any two names of keys available in DBMS.
Ans:
Key is a field (or set of fields) in a table that is used to identify records uniquely and establish relationships between tables. Any two types of keys in DBMS are: Primary Key and Foreign Key.

i) What is query? Write any two ways of creating query.
Ans:
Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Any two ways of creating query are: Design View and Using Query Wizard.

 

5. Write down the output of the given program. Show with dry run in table.

DECLARE SUB DTB (N)

CLS

N = 5126

CALL DTB (N)

END

SUB DTB (N)

WHILE N <> 0

    R = N MOD 10

    S = S + R

    N = N \ 10

WEND

PRINT S;

END SUB

Ans: Dry Run Table:

N

WHILE N <> 0

R = N MOD 10

S = S + R

N = N \ 10

PRINT S;

5126

5126<>0 YES

6

0+6=6

512

-

512

512<>0 YES

2

6+2=8

51

-

51

51<>0 YES

1

8+1=9

5

-

5

5<>0 YES

5

9+5=14

0

-

0

0<>0 NO

14

The output of the program is:     14

 

6. Rewrite the given program after correcting the bugs:

REM WAP to create file “detail.dat” and insert some records.

CLS

OPEN “detail.dat” FOR APPEND AS $5

TOP:

INPUT “Enter name, class and address”; n$, cl, a$

INPUT #5, n$, cl, a$

INPUT “Do you want to add more? {Y/N)”; C$

IF UCASE$(C$)=”Y” OR C$=”y” THEN GOTO down

CLOSE #5

END

Ans: Debugged Program:

REM WAP to create file “detail.dat” and insert some records.

CLS

OPEN “detail.dat” FOR OUTPUT AS #5

TOP:

INPUT “Enter name, class and address”; n$, cl, a$

WRITE #5, n$, cl, a$

INPUT “Do you want to add more? {Y/N)”; C$

IF UCASE$(C$)=”Y” THEN GOTO TOP

CLOSE #5

END

 

7. Study the following program and answer the given questions.

DECLARE FUNCTION count (N$)

INPUT "Enter a word"; W$

C = count (W$)

PRINT C

END

FUNCTION count (N$)

FOR K = 1 TO LEN (N$)

    X$ = MID$ (N$, K, 1)

    IF UCASE$(X$) = "A" THEN

        X = X + 1

    END IF

NEXT K

Count = X

END FUNCTION

a) What are the library functions used in the above program?
Ans:
The library functions used in the above program are: LEN( ), MID$( ), and UCASE$( ).

b) Write the use of variable ‘C’ in line 3 in program [i.e. C = count(W$)]
Ans:
The use of variable ‘C’ in line 3 in program [i.e. C = count(W$)] is to store the value (occurrence of character “A”) returned by count function.

 

Group 'C'

8. Convert/calculate as per the instruction:

a) (A4D)₁₆ = (?)₂                Ans: (101001001101)₂

b) (37)₁₀ = (?)₈                  Ans: (45)₈

c) (10101)₂ ÷ (101)₂         Ans: Quotient = 100₂, Remainder = 1₂

d) (1111)₂ × (101)₂          Ans: (1001011)₂

 

9. a) Write a program in QBASIC that asks height and radius of cylinder and calculate its volume by user define function and total surface area by sub procedure.

DECLARE FUNCTION VOL (R, H)

DECLARE SUB AREA (R, H)

CLS

INPUT "Enter radius of the cylinder: ", R

INPUT "Enter height of the cylinder: ", H

PRINT "Volume of cylinder: "; VOL(R, H)

CALL AREA(R, H)

END

 

FUNCTION VOL (R, H)

    VC = 22 / 7 * R * R * H

    VOL = VC

END FUNCTION

 

SUB AREA (R, H)

    TSA = 2 * 22 / 7 * R * (R + H)

    PRINT "Total Surface Area of cylinder: "; TSA

END SUB

 

b) A sequential data file called “student.txt” has stored data under the field heading Name, Class, Address and Age. Write a program to display all the information of those whose class is 10 and gender is “male”.

OPEN "student.txt" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

    INPUT #1, N$, C, A$, AG$, G$

    IF C = 10 AND UCASE$(G$) = "M" THEN

        PRINT "Name: "; N$

        PRINT "Class: "; C

        PRINT "Address: "; A$

        PRINT "Age: "; AG$

    END IF

WEND

CLOSE #1

END

 

10. Write a program in C language to check the students whether that are pass or fail, when the pass mark is 45.

#include <stdio.h>

int main() 

{

    int m;

    printf("Enter the marks: ");

    scanf("%d", &m);

    if (m >= 45)

        {

        printf("Pass");

        }

    else

       { 

        printf("Fail");

       }

    Return 0;

}

OR
Write a program in C language to display the series with their sum 40, 41, 42, 43…….10th terms.

#include <stdio.h>

int main() 

{

int i,a=40,s=0;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    s=s+a;

    a=a+1;

}

    printf("The sum is %d",s);

    return 0;

}

 

 

SET 9: PABSON 2080 (Karnali/Sudurpaschim)

Group 'A'

1. Answer the following questions in one sentence:

a) What do you mean by primary key?
Ans:
Primary key is a field or set of fields that uniquely identifies each record in a database table. Example of Primary Key: StudentID in a Student Table.

b) What is a database? Give example.
Ans:
Database is a collection of systematically organized inter-related data which store, manage, and retrieve data. Any two examples of database are: Dictionary and Marks Ledger.

c) Define cyber ethics.
Ans:
Cyber ethics is a set of moral principles and guidelines that govern the responsible and safe use of computers, internet and digital technologies.

d) Write any two keywords used in C-programming.
Ans:
Any two keywords used in C-programming are int and float.

e) What do you mean by B2C model of e-commerce?
Ans:
B2C (Business to Consumer) is a type of e-commerce in which Businesses sell directly to individual customers.

f) What is the function of INT() in QBASIC programming?
Ans:
The INT() function returns the integer portion of a number by removing the decimal part.

2. Write appropriate technical term for the following:

a) The device that is used to connect two networks with different communication protocols. Ans: Gateway

b) A person who breaks computer security and uses a computer and file present in it.  Ans: Hacker

 

3. Write the full form of the following:

a) VOIP: Voice Over Internet Protocol
b) WLAN: Wireless Local Area Network

 

Group 'B'

4. Answer the following questions:

a) What is computer network architecture? Mention its types.
Ans:
Network architecture is the design and layout of a network, including how its components are arranged and how they interact. The three types of network architecture are:

1.       Peer to Peer Network

2.       Client-Server Network

3.       Centralized Network

b) What do you mean by digital signature? Why it is important?
Ans:
Digital signature is an electronic code attached to a digital message or document that verifies the identity of the sender and ensures the message or document is authentic. It is important because of the following reasons:

1.       It provides security, confirms the identity of the sender, ensures the information has not been changed.

2.       It helps build trust in digital communications.

c) What is a firewall? Enlist the types of firewalls.
Ans:
A firewall is a security system that monitors and controls incoming and outgoing network traffic to protect systems from unauthorized access and cyber threats.

The types of firewalls are as follows:
a) Hardware Firewall: A physical device that protects an entire network by filtering traffic at its entry point.
b) Software Firewall: A program installed on an individual computer that controls traffic to and from only that specific device.

d) Differentiate between computerized and non-computerized databases.

Computerized Database

Non-Computerized Database

A database where data is stored and managed using a computer and software.

A database where data is stored and managed manually using files or registers.

Example: Student records stored in MS-Access.

Example: Student records written in a register.

Data can be searched and updated very fast.

Data is searched and updated slowly.

Data is more secure with passwords and backup.

Data is less secure and can be easily lost or damaged.

e) What is AI? Enlist two application areas of AI.
Ans:
Artificial Intelligence (AI) is a branch of computer science that deals with creating intelligent machines capable of thinking, learning, and making decisions like humans.

Any two application areas of AI are:

1.       It helps in healthcare (diagnosis and treatment)

2.       It helps in education (smart learning systems)

f) What is hardware security? Enlist any two measures to protect it.
Ans:
Hardware security is the protection of the physical components of a computer or electronic device from unauthorized access, loss, or damage. Any two measures of hardware security are:
a) Regular Maintenance and Dust free environment

b) Power Protection device (Volt guard, Spike guard, UPS)

g) What is field property in Ms-Access? Enlist any four of them.
Ans:
Field properties are the settings of a field that control how data is stored, displayed, and entered in a table.

Any four field properties are: a) Field Size   b) Format   c) Default Value   d) Validation Rule   e) Validation Text 

h) What is Indexing? Why form and report are used in MS-Access?
Ans:
Indexing is a database technique used to arrange data in a field so that records can be searched, sorted, and accessed faster.
Form is used to provide graphical interface to view, modify and add data in a table or multiple linked tables.

Report is used to present information in an effective and organized format that is ready for printing.

i) What is Query? Write the types of Action Query.
Ans:
Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Different types of Action Query are: Append Query, Update Query, Delete Query and Make Table Query.

 

5. Write the output of the given program. (workout with a dry-run table)

DECLARE SUB Show()

CLS

CALL Show

END

SUB Show

C=3

B=2

FOR I = 2 TO 8 STEP 2

    PRINT C;

    SWAP B, C

    B = C + 1

NEXT I

END SUB

Ans: Dry Run Table:

B

C

FOR I = 2 TO 8 STEP 2

PRINT C;

SWAP B, C

B = C + 1

2

3

2 to 8 step 2 yes

3

B=3, C=2

2+1=3

3

2

4 to 8 step 2 yes

2

B=2, C=3

3+1=4

4

3

6 to 8 step 2 yes

3

B=3, C=4

4+1=5

5

4

8 to 8 step 2 yes

4

B=4, C=5

5+1=6

6

5

10 to 8 step 2 no

(Loop Exits)

The output of the program is:

3   2   3   4

 

6. Rewrite the given program after correcting bugs:

REM To add a few records in the existing data file

CLS

OPEN "emp.dat" FOR OUTPUT AS #2

DO

INPUT "Enter Employee Name, Post, Salary”; EN$, POST$, SALARY

PRINT #2, EN$, POST$, SALARY

INPUT “ADD MORE RECORDS (Y/N)?”; C

LOOP WHILE UCASE$(C$)=”Y”

CLOSE #1

END

Ans: Debugged Program:

REM To add a few records in the existing data file

CLS

OPEN "emp.dat" FOR APPEND AS #2

DO

INPUT "Enter Employee Name, Post, Salary”; EN$, POST$, SALARY

WRITE #2, EN$, POST$, SALARY

INPUT “ADD MORE RECORDS (Y/N)?”; C$

LOOP WHILE UCASE$(C$)=”Y”

CLOSE #2

END

 

7. Study the following program and answer the given questions:

DECLARE FUNCTION SUM(N)

CLS

INPUT "Enter a number"; N

X=SUM(N)

PRINT "The sum of individual digits is"; X

END

FUNCTION SUM(N)

WHILE N<>0

    R=N MOD 10

    S=S+R

    N=INT(N/10)

WEND

SUM=S

END FUNCTION

a) Name the user defined function in the above program.
Ans:
The user defined function in the above program is SUM().

b) How many times the WHILE WEND loop repeats If the value of N is 1234?
Ans:
4 times the WHILE WEND loop repeats If the value of N is 1234.

 

Group 'C'

8. Calculate or convert as per the instructions:

a) (CA)₁₆ = (?)₁₀                               Ans: (202)₁₀

b) (652)₁₀ = (?)₈                              Ans: (1214)₈

c) (10101)₂ × (11)₂ – (1110)₂        Ans: (110001)₂

d) (111011)₂ ÷ (100)₂                    Ans: Quotient = 1110₂, Remainder = 11₂

 

9. a) Write a program in QBASIC to input a radius, create a user defined function to calculate the volume of hemisphere and total surface area (TSA) of the sphere using sub procedure.

DECLARE FUNCTION VOL (R, H)

DECLARE SUB AREA (R, H)

CLS

INPUT "Enter radius of the cylinder: ", R

INPUT "Enter height of the cylinder: ", H

PRINT "Volume of cylinder: "; VOL(R, H)

CALL AREA(R, H)

END

 

FUNCTION VOL (R, H)

    V = 22 / 7 * R * R * H

    VOL = V

END FUNCTION

 

SUB AREA (R, H)

    TSA = 2 * 22 / 7 * R * (R + H)

    PRINT "Total Surface Area of cylinder: "; TSA

END SUB

 

b) A sequential data file "record.dat” contains the name, address, salary of employees, and displays the record of those whose salary is more than 37000 and whose name ends with "DHA".

OPEN "record.dat" FOR INPUT AS #1 

CLS

WHILE NOT EOF(1) 

    INPUT #1, N$, A$, S 

    IF S > 37000 AND RIGHT$(N$, 3) = "DHA" THEN 

        PRINT "Name: "; N$

        PRINT "Address: "; A$

        PRINT "Salary: "; S 

    END IF 

WEND 

CLOSE #1

 

10. Write a C program to input a character and check whether it is vowel or consonant.

#include <stdio.h>

int main()

{

    char ch;

    printf("Enter a character: ");

    scanf("%c", &ch);

    if (ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U' ||

        ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')

    {

        printf("It is a vowel");

    } else {

        printf("It is a consonant");

    }

    return 0;

}

 

OR
Write a program in C language to input a number and check whether it is a palindrome or not.

#include<stdio.h>

int main()

{

int n, rev=0, original;

printf("Enter a number: ");

scanf("%d", &n);

original=n;

while(n>0)

{

    rem=n%10;

    rev=s*10+r;

    n=n/10;

}

printf("Reverse of an integer is %d",rev);

if (original == rev)

        printf("The number is a palindrome.");

else 

        printf("The number is not a palindrome.");

return 0;

}

 

 

SET 10: SOS EXAM 2080

Group ‘A’

1. Answer the following questions in one sentence:

a. Write any two examples of full duplex mode of data transmission.
Ans:
Any four examples of full duplex mode are: Mobile phones and Video Call

b. Mention any two services of the Internet.
Ans:
Any two services of the Internet are E-mail and E-Commerce.

c. Which query is used to make changes in data stored in the database?
Ans:
Action Query (Update Query) is used to make changes in data stored in the database.

d. Which data type is also known as logical data type in MS-Access?
Ans:
Yes/No data type is known as the logical data type in MS-Access.

e. List the modes of operation for opening a sequential file.
Ans:
The modes of operation for opening a sequential file are: INPUT Mode, OUTPUT Mode and APPEND Mode.

f. Write any two looping statements used in C language.
Ans:
Any two looping statements used in C language are: 1) for loop        2) while loop

 

2. Write the appropriate technical term:

a. A network connecting device that boosts data signals.               Ans: Repeater

b. The use of computer technology to create a simulated environment.                Ans: Virtual Reality (VR)

 

3. Write the full form of the following acronyms:

a. OTP: One Time Password
b. PaaS: Platform as a Service

 

Group ‘B’

4. Answer the following questions:

a. “The Internet is called a network of networks.” Justify.
Ans:
The Internet is called a network of networks because it is formed by connecting millions of smaller networks, such as LANs, MANs, and WANs, across the world. These networks are linked together using common communication protocols, allowing computers and devices everywhere to share information and communicate with each other globally.

b. What is hacking? What is its purpose?
Ans:
Hacking is the unauthorized access to computer systems or networks, often done to steal data, destroy information, or disrupt services.

The purpose of hacking is to gain unauthorized access to computer systems or networks to steal data, destroy information, or disrupt services for personal, financial, or political gain.

c. Define antivirus software with four examples.
Ans:
Antivirus software is a program that scans, detects, and removes malicious software from a computer or device to protect it from security threats.

Any four examples of popular antivirus software are: Norton Antivirus, McAfee Antivirus, Bit defender and Kaspersky Antivirus.

d. What is E-commerce? Write any four Nepali e-commerce websites.
Ans:
E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Any four Nepali e-commerce websites are: daraz.com.np, sastodeal.com, hamrobazaar.com and muncha.com.

e. What is AI? List any four areas of AI.
Ans:
Artificial Intelligence (AI) is a branch of computer science that deals with creating intelligent machines capable of thinking, learning, and making decisions like humans.

Any four areas where AI can help us are:
a) It helps in healthcare (diagnosis and treatment)
b) It helps in education (smart learning systems)
c) It helps in transportation (self-driving vehicles)
d) It helps in robotics and automation

f. What is DBMS? Name any four examples.
Ans:
A Database Management System (DBMS) is a software that allows users to store, manage, and retrieve data in an organized way. Any four examples of DBMS software are: Microsoft Access, Oracle, MySQL and SQL Server.

g. Differentiate between field and record.

Field (Attribute)

Record (Tuple)

A single column in a table that stores one type of information about all records.

A single row in a table that contains all information about one item or entity.

Example: Symbol No., Name, Marks

Example: 00100202S, Aarambha Shrestha, 91

h. What is a report? Write any two importance.
Ans:
Report is one of the MS-Access database objects used to present information in an effective and organized format that is ready for printing. Any two importance of a report are:

1) It presents data in a clear and well-organized format.

2) It makes printing of database information easy and professional.

i. Write any four advantages of a computerized database.

Ans: Any four advantages of computerized database are:

1. It allows a large volume of data to be stored and updated easily.

2. It reduces data redundancy by avoiding duplicate data.

3. It ensures data security and integrity.

4. It allows data sharing among multiple users at the same time.

 

5. Output of the program (with dry run):

DECLARE SUB SHOW(A)

CLS

N=87

CALL SHOW(N)

END

SUB SHOW (A)

DO

B=A MOD 6+3

IF B MOD 4=0 THEN GOTO AA

PRINT B;

AA:

A=A-10

LOOP WHILE A>=50

END SUB 

Ans: Dry run table:

A(N)

B =A MOD 6+3

Is B MOD 4=0?

PRINT B;

A=A-10

WHILE A>=50

87

87 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

87-10=77

77>=50 yes

77

77 MOD 6 + 3 =8

5+3=8

8 MOD 4=0

0=0YES

 -

77-10=67

67>=50 yes

67

67 MOD 6 + 3=4

1+3=4

4 MOD 4=0

0=0 YES

 -

67-10=57

57>=50 yes

57

57 MOD 6 + 3=6

3+3=6

6 MOD 4=0

2=0 NO

6

57-10=47

47>=50 no

(Loop Exits)

The output of a program is:

6    6

 

6. Rewrite the program after correcting errors:

REM to add more data in a sequential file

OPEN “EMP.DAT” FOR INPUT AS #2

DO

INPUT “ENTER NAME”; N$

INPUT “ENTER ADDRESS”; A$

INPUT ENTER SALARY”; S$

WRITE #1, N$, A$, S

INPUT “Do you want tis add more records”; M$

LOOP WHILE UCASE(M$) ="Y"

END

Ans: Debugged Program:

REM To add more data in a sequential file

OPEN "EMP.DAT" FOR APPEND AS #1

DO

INPUT "ENTER NAME"; N$

INPUT "ENTER ADDRESS"; A$

INPUT "ENTER SALARY"; S

WRITE #1, N$, A$, S

INPUT "Do you want to add more records"; M$

LOOP WHILE UCASE$(M$) = "Y"

CLOSE #1

END

 

7. Study the following program and answer the given questions:

DECLARE SUB PC(N)

CLS

INPUT "Emer a number"; N

CALL PC(N)

END 

SUB PC (N) 

FOR 1=2 TO N-1

R=N MOD I

IF C=0 THEN 

PRINT "Prime number”

ELSE

PRINT "Composite number”

ENDIF 

END SUB

a. What is the name of the sub procedure? 

Ans: The name of the sub procedure is PC().

h List the local variables. 

Ans: The local variables are:  N, I, R and C

 

Group ‘C’

8. Convert/calculate as per the instructions:

(a) (100111101)₂ = (?)₁₆                Ans: (13D)₁₆

(b) (912)₁₀ = (?)₈               Ans: (1620)

(c) (10010)₂ × (1110)₂ – (10101)₂ = (?)₂    Ans: (11100111)₂

(d) (1011101)₂ ÷ (111)₂                Ans: Quotient (Q) = (1101)₂, Remainder (R) = (10)₂

 

9. a. Write a program in QBASIC that asks any number and display its square and square root: Create a user- defined function to calculate square root and a sub program to display the square of a number.

DECLARE FUNCTION SQRT(N)

DECLARE SUB SQUARE(N)

CLS

INPUT "Enter a number: ", N

CALL SQUARE(N)

PRINT "Square root: "; SQRT(N)

END

 

FUNCTION SQRT(N)

ST = SQR(N)

SQRT = ST

END FUNCTION

 

SUB SQUARE(N)

S = N*N

PRINT "Square: "; S

END SUB

 

b. A data file "Staff.dat” has stored records of few employers with EmpID, name, address post and salary. Write a program is display all the records of the employees whose address is "Nepal" and salary is than 40.000

OPEN "Staff.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, EID, N$, A$, P$, S

IF UCASE$(A$) = "NEPAL" AND S < 40000 THEN

PRINT "Employee ID:"; EID

PRINT "Name:"; N$

PRINT "Address:"; A$

PRINT "Post:"; P$

PRINT "Salary:"; S

END IF

WEND

CLOSE #1

END

 

10. Write a program in C language that asks any integer value and checks whether it is odd or even.

#include<stdio.h>

int main( )

{

      int a;

      printf(“Enter any number”);

      scanf(“%d”, &a);

      if (a %2==0)

      printf("It is EVEN");

      else

      printf("It is ODD");

      return 0;

 }

 

OR

Write a program in C language to display the first 10 odd numbers.

#include <stdio.h>

int main() 

{

int i,a=1;

for(i=1;i<=10;i++)

{

    printf("%d",a);

    a=a+2;

}

    return 0;

}

 

 

SET 11: PABSON EXAM -2079

Group ‘A’

1. Answer the following questions in one sentence.

a) Where does intranet has been used?
Ans:
An intranet is used within organizations to share information and resources among its members.

b) Write any two benefits of cloud computing.
Ans:  
Any two benefits of cloud computing are:

1.       It reduces the cost of hardware and maintenance.

2.       It provides easy access to data and applications from anywhere using the internet.

c) Which data type is used to store date of birth of an employee in MS-Access?
Ans:
Date/Time data type is used to store date of birth of an employee in MS-Access.

d) Write any two data type used in MS-Access database?
Ans:
Any two data types used in MS-Access are: Text (Short Text) and Number.

e) What are procedure in QBASIC?
Ans:
The procedure used in QBASIC are SUB procedure and FUNCTION procedure.

f) Write any two features in 'C' language.
Ans:
Any two features in 'C' language are as follows:
a) C is a structured programming language.

b) C is a simple and portable (machine-independent) language.

c) C provides fast execution and efficient performance.

2. Write appropriate technical term for the following.

a) The protocol that makes the network communication possible.              Ans: TCP/IP

b) Digital marks created while using Internet.                    Ans: Digital Footprint

 

3. Write the full form of the following.

a) ISDN: Integrated Services Digital Network
b) TCP/IP: Transmission Control Protocol / Internet Protocol

 

Group ‘B’

4. Answer the following question in short.

a) Differentiate between peer to peer and client-server network with figure.

Peer-to-Peer (P2P) Network

Client-Server Network

A peer-to-peer (P2P) network is a network in which each computer acts as both client and server, sharing files and resources directly without a central server.

A client-server network is a network in which one or more servers provide services and resources to client computers.

Figure: Do Yourself

Figure: Do Yourself

It does not require a system administrator.

It requires a network administrator.

It has low security and difficult data backup and recovery.

It has better security and easy centralized backup and recovery.

b) What is cyber ethics? Give any two examples of it.
Ans:
Cyber ethics is a set of moral principles and guidelines that govern the responsible and safe use of computers, internet and digital technologies.

Any two examples of cyber ethics are:
a) Do not use the internet to cyberbully or to spread false information online.
b) Don't use the Internet to download or share copyrighted material.

c) What is software security? Write any two measures of software security.
Ans:
Software security is the protection of computer programs and applications from threats, such as hacking, virus attacks, and unauthorized access, to ensure their confidentiality, integrity, and availability. Any two measures of software security are:
a) Authentication System (Password and Biometric) and Use of Antivirus software
b) Cryptography (Encryption and Decryption) and Backup System

d) Define E-Commerce? Write its importance.
Ans:
E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Any two importance (benefits) of E-Commerce are:
a) Shop 24/7 from anywhere with Internet access.
b) Easily compare products, prices, and reviews.

e) Why mobile computing is necessary in present time? Write any two importance of it.
Ans: Mobile computing is important now because it lets people use their phones or tablets to get things done from anywhere, anytime, making life easier and more efficient.
Any two importance of mobile computing are:
We can stay connected to all sources at all times.
We can interact with a variety of users via the Internet.

f) Differentiate between Primary key and foreign key with example.

Primary Key

Foreign Key

It is a field or set of fields that uniquely identifies each record in a table.

It is a field or set of fields that refers to the primary key of another table to establish relationship between two tables.

It does not allow duplicate or NULL values.

It may allow duplicate values and NULL values.

There is only one primary key in a table.

There can be more than one foreign key in a table.

Example: StudentID in a Student table.

Example: StudentID in a Class table that refers to StudentID in a Student table.

g) What is query? List any two advantages of it.
Ans:
Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Any two advantages of Query are:

1. It helps to retrieve specific data quickly from one or more tables.

2. It makes sorting, filtering, and analyzing data easy.

h) What is data sorting? List any two advantages of using it.
Ans:
Data sorting is the process of arranging all the records in a table either ascending or descending order based on one or more fields. Any two advantages of using data sorting are:

1. It makes it easier to find records quickly.

2. It helps to analyse and compare data efficiently.
i) Define form. Write its importance
Ans:
Form is one of the MS-Access database objects which provides graphical interface to view, modify and add data in a table or multiple linked tables. 

The importance of form are as follows: 

1. It is user-friendly and makes data entry easy.

2. It helps in reducing errors during data entry.

3. It allows better organization and display of data.

 

5. Write down the output of the given program. Show with dry run in table.

DECLARE SUB SERIES()

CLS

CALL SERIES

END

SUB SERIES()

X=1

Y=2

FOR P = 1 TO 10

PRINT X;

X=X+Y

Y=Y+1

NEXT P

END SUB

Ans: Dry Run Table:

X

Y

FOR P=1 TO 10

 PRINT X:

X=X+Y

Y=Y+1

1

2

1 TO 10 Yes

1

1+2=3

2+1=3

3

3

2 TO 10 Yes

 3

3+3=6

3+1=4

6

4

3 TO 10 Yes

 6

6+4=10

4+1=5

10

5

4 TO 10 Yes

 10

10+5=15

5+1=6

15

6

5 TO 10 Yes

 15

15+6=21

6+1=7

21

7

6 TO 10 Yes

 21

21+7=28

7+1=8

28

8

7 TO 10 Yes

 28

28+8=36

8+1=9

36

9

8 TO 10 Yes

 36

36+9=45

9+1=10

45

10

9 TO 10 Yes

 45

45+10=55

10+1=11

55

11

10 TO 10 Yes

 55

55+11=66

11+1=12

66

12

11 TO 10 No

(Loop Exits)

 

 

 

The output of the program is:

1   3   6   10   15   21   28   26   45   55

 

6. Re-write the given program after correcting the bugs:

REM to store record in data file

CLS

OPEN "employee.dat" FOR INPUT AS #1

DO

INPUT "Enter Name, address and gender": N$, A. G

INPUT #1, N$, A. G

INPUT "Do you want to continue "; Y$

WHILE UCASE$(Y$) = "Y"

CLOSE "employee.dat"

END

Ans: Debugged Program:

REM to store record in data file  

CLS

OPEN "employee.dat" FOR OUTPUT AS #1

DO

INPUT "Enter Name, address and gender": N$, A$, G$

WRITE #1, N$, A$,G$

INPUT "Do you want to continue "; Y$

LOOP WHILE UCASE$(Y$) = "Y"

CLOSE #1

END

 

7. Study the following program and answer the given questions:

DECLARE FUNCTION text$(N$)

CLS

INPUT "Enter any string": X$

PRINT text$(X$)

END

FUNCTION text$(N$)

FOR i = LEN(N$) TO 1 STEP -1

W$ = W$ + MID$(N$, i, 1)

NEXT i

text$ = W$

END FUNCTION

a) What is the main objective of above program?
Ans: The main objective of above program is to reverse the string.

b) List all the parameters used in above program.
Ans: The parameters used in above program are X$ and N$

 

Group ‘C’

8. Convert/ Calculate as per the instruction.

a) (10111101)₂ = (?)₈      Ans: (275)₈

b) (645)₁₀ = (?)₁₆               Ans: (285)₁₆

c) (10101)₂ × (111)₂         Ans: (10010011)₂

d) (111110)₂ ÷ (110)₂      Ans: Quotient = 1010₂, Remainder = 10₂

 

9. a) Write a program in QBASIC to input length and breadth of room and calculate its area using function and perimeter using sub procedure. [Hint: Area = lxb. Perimeter = 2(l+b)]

DECLARE FUNCTION AREA(L,B)

DECLARE SUB PERI(L,B)

CLS

INPUT "ENTER LENGTH: "; L

INPUT "ENTER BREADTH: "; B

PRINT "AREA OF RECTANGLE: "; AREA(L,B)

CALL PERI(L,B)

END

 

FUNCTION AREA(L,B)

AREA = L * B

END FUNCTION

 

SUB PERI(L,B)

P = 2 * (L + B)

PRINT "PERIMETER OF RECTANGLE: "; P

END SUB

 

b) A sequential data file called "Records.dat" has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the records of students whose marks in computer is more than 90.

OPEN “Record.txt” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, R, N$, G$, E, N, M, C

IF C>=90 THEN

PRINT "Roll No:";R N$; G$; E; N; M; C

PRINT "Name:";N$

PRINT "Gender:";G$

PRINT "Marks in English:";E

PRINT "Marks in Nepali:";N

PRINT "Marks in Maths:";M

PRINT "Marks in Computer:";C

END IF

WEND

CLOSE #1

END

10. Write a program in C to sum of odd number from 80 to 90.

#include <stdio.h>

int main()

{

    int i, a = 81, s = 0;

    for(i = 1; i <= 5; i++)

    { 

        printf("%d ", a);

        s = s + a;

        a = a + 2;

    }

    printf("The Sum is %d", s);

    return 0;

}

 

OR

Write a program in 'C' language to input three number and find greatest number among three numbers.

#include <stdio.h>

int main() 

{

    int a, b, c;

    printf("Enter 1st number:");

    scanf("%d ", &a);

    printf("Enter 2nd number:");

    scanf("%d ", &b);

    printf("Enter 3rd number:");

    scanf("%d ", &c);

    if (a < b && a < c)

        {

        printf("The greatest number is %d", a);

        }

    else if (b < a && b < c)

       {

        printf("The greatest number is %d", b);

       }

    else

       {

        printf("The greatest number is %d", c);

       }

    return 0;

}

 

SET 12: PABSON 2078

Group 'A'

1) Give answer in one sentence for the following question.

a) Define bandwidth.
Ans:
Bandwidth is the maximum amount of data that can be transmitted over a network or communication channel in a given amount of time.

b) What is cyber bullying?
Ans:
Cyberbullying refers to harassment or bullying that takes place through electronic devices and digital platforms, such as the internet, social media, or messaging apps.

c) What is AI?
Ans:
Artificial Intelligence (AI) is a branch of computer science that deals with creating intelligent machines capable of thinking, learning, and making decisions like humans.

d) What is the storage size of memo and text data type in MS- Access?
Ans:
The storage size of text data type is 255 characters. The storage size of memo data type is 65,535 characters.

e) What is local variable?
Ans:
A variable which is defined in a module and is not accessible to any other module is called local variable.

f) What is an operator in C language?
Ans:
An operator is a symbol that tells the compiler to perform a specific operation on one or more operands.

 

2) Write appropriate technical terms for the following.

a) Secret group of characters which helps to protect file from unauthorized person. Ans: Password

b) A type of network in which every computer works as both client and server. Ans: Peer to Peer Network

3) Write the full forms of the following.

i) ADSL: Asymmetric Digital Subscriber Line
ii) TCP/IP: Transmission Control Protocol / Internet Protocol

 

Group 'B'

4) Answer the following questions.

a) Differentiate between LAN and WAN.

LAN (Local Area Network)

WAN (Wide Area Network)

A LAN is a network that connects computers and devices within a small area such as a home, office, or school.

A WAN is a network that connects computers and devices over a very large area, such as a country or the whole world.

Example: Computer lab network, cybercafé network.

Example: Internet, 4G mobile network, satellite communication.

b) Write any four commandments of computer ethics.
Ans:
Any four commandments of computer ethics are:

1.       Should not use a computer to harm other people.

2.       Should not use a computer to publish fake information.

3.       Should not snoop around in other people’s computer files.

4.       Should not destroy or delete the records of other people.

c) What is E- commerce? List any two E- commerce companies in Nepal.
Ans:
E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Any two E-commerce companies in Nepal are: daraz.com.np and sastodeal.com.

d) What are the advantages of cloud computing?
Ans:
The advantages of cloud computing are:
a) It reduces the cost of hardware and maintenance.
b) It provides easy access to data and applications from anywhere using the internet.
c) It ensures safe data backup and easy recovery.
d) It provides large storage capacity.

e) What is VR? Mention its application areas.

Ans: Virtual Reality is the use of computer technology to create a simulated environment that feels like a real world to the user. Any two application areas of Virtual Reality are:

1. Gaming and entertainment

2. Education and training

f) What is DBMS? Give any two examples.
Ans:
A DBMS (Database Management System) is a software that allows users to store, manage, and retrieve data in an organized way. Any two examples are MS-Access and Oracle.

g) What is primary key? List any two advantages.
Ans:
Primary key is a field or set of fields that uniquely identifies each record in a database table.

Any two advantages of primary key are:
a) It identifies each record of a table uniquely.
b) It reduces and control duplication of records in a table.

h) What is query?
Ans:
Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Different types of query are:

1. Select Query

2. Action Query (Append, Update, Delete and Make Table)

i) What is data sorting? Write its two advantages.
Ans:
Sorting is the process of arranging all the records in a table either ascending or descending order based on one or more fields.

Any two advantages of sorting are:

1) It makes it easier to find records quickly.

2) It helps to analyse and compare data efficiently.

 

5) Write down the output of the given programs.

DECLARE SUB DISPLAY(A)

CLS

A = 3

CALL DISPLAY(A)

END

 

SUB DISPLAY(A)

FOR X = 1 TO 6

    PRINT A;

    IF A MOD 2 = 0 THEN

        A = A / 2

    ELSE

        A = (A * 3) + 1

    END IF

NEXT X

END SUB

Ans: Dry Run Table:

A

FOR X=1 TO 6

PRINT A;

IS A MOD 2=0?

Yes (A=A/2)

No(A=A*3+1)

3

1 To 6 Yes

3

3 MOD 2=0

1=0 NO

3*3+1=10

10

2 To 6 Yes

10

10 MOD 2=0

0=0 YES

-

5

3 To 6 Yes

5

5 MOD 2=0

1=0 NO

5*3+1=16

16

4 To 6 Yes

16

16 MOD 2=0

0=0 YES

-

8

5 To 6 Yes

8

8 MOD 2=0

0=0 YES

-

4

6 To 6 Yes

4

4 MOD 2=0

0=0 YES

-

2

7 To 7 No

Loop

-

-

-

The output of the program is:
3            10          5            16          8            4

 

6) Re-write the given program after correcting the bugs.

REM to add more data in a sequential file.

OPEN “EMP.DAT” FOR INPUT AS #2

DO

INPUT “ENTER NAME”; N$

INPUT “ENTER ADDRESS”; A$

INPUT “ENTER SALARY”; S$

WRITE #1, N$, A$, S

INPUT” Do you want to add more records.”; M$

LOOP WHILE UCASE(M$) = “Y”

END

Ans: Debugged Program:

REM to add more data in a sequential file.

OPEN “EMP.DAT” FOR APPEND AS #2

DO

INPUT “ENTER NAME”; N$

INPUT “ENTER ADDRESS”; A$

INPUT “ENTER SALARY”; S

WRITE #2, N$, A$, S

INPUT” Do you want to add more records.”; M$

LOOP WHILE UCASE$(M$) = “Y”

CLOSE #2

END

 

7) Study the given program and answer the given questions.

DECLARE FUNCTION test$(A$)

CLS

INPUT "ENTER ANY WORD"; T$

PRINT test$(T$)

END

 

FUNCTION test$(A$)

FOR M = LEN(A$) TO 1 STEP -1

    C$ = C$ + MID$(A$, M, 1)

NEXT M

test$ = C$

END FUNCTION

a) List the formal and actual parameters used in the program given above.
Ans:
Formal parameter = A$                     Actual parameter = T$

b) List the library function used in the above program.
Ans:
The library function used in the above program is LEN( ) and MID$( ).

 

Group 'C'

8) Convert/Calculate as per the instruction:

a) (CCA)₁₆ into binary                    Ans: (110011001010)₂

b) (654)₁₀ into octal                       Ans: (1216)₈

c) (111011)₂ ÷ (100)₂                     Ans: Quotient = 1110₂, Remainder = 11₂

d) (10101 - 1110)₂ × (10)₂            Ans: (1110)₂

 

9) Write a program in QBASIC that allows user to enter radius of a circle. Create a user define function to find the area of circle and sub procedure to find volume of a cylinder.

DECLARE FUNCTION AREA(R)

DECLARE SUB VOL(R, H)

CLS

INPUT "Enter Radius"; R

INPUT "Height"; H

PRINT "Area of Circle="; AREA(R)

CALL VOL(R, H)

END

 

FUNCTION AREA(R)

A = 3.14 * R ^ 2

AREA = A

END FUNCTION

 

SUB VOL(R, H)

V = 3.14 * R ^ 2 * H

PRINT "Volume of Cylinder="; V

END SUB

 

10) A sequential data file "emp.dat" contains employee's name, address, gender and salary. WAP to display all the information of employees whose salary is more than Rs. 20,000

OPEN "emp.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

    INPUT #1, N$, A$, G$, S

    IF S > 20000 THEN

    PRINT “Name:” N$

    PRINT “Address:” A$

    PRINT “Gender:” G$

    PRINT “Salary:” S

WEND

CLOSE #1

END

 

11) Write a program in C language to input any two numbers and find greater number.

#include<stdio.h>

int main()

{

    int a, b;

    printf("Enter any two numbers:\n ");

    scanf("%d %d", &a, &b);

    if(a > b)

        printf("The greater number is %d", a);

    else

        printf("The greater number is %d", b);

    return 0;

}

 

OR
Write a program in C language that asks user to enter any number and check whether the number is odd or even.

#include<stdio.h>

int main( )

{

      int a;

      printf(“Enter any number”);

      scanf(“%d”, &a);

      if (a %2==0)

      printf("It is EVEN");

      else

      printf("It is ODD");

      return 0;

 }

 

 

 

SET 13: NPABSON 2081(SURKHET)

GROUP 'A'

1. Answer the following questions:

a. What is transmission signal?

Ans: A transmission signal is a wave or electrical current that is used to carry information from one place to another through a medium such as wires or air.

b. What is logical threat in cyber field?

Ans: A logical threat in the cyber field refers to a type of threat that targets the software, data, or systems of a computer or network.

c. Which data type is suitable to store of student name in MS-Access?

Ans: Text (Short Text) data type is suitable to store the name of a student in MS-Access.

d. What is report?

Ans: Report is one of the MS-Access database objects used to present information in an effective and organized format that is ready for printing. The data sources for report are table and query.

e. What is formal parameter?

Ans: Formal parameter are variables which are used to specify or declare types of data to be passed to the procedure either sub or function.

f. Write down two header files use in C language.

Ans: The two header files use in C language are stdio.h and conio.h

 

2. Write appropriate technical term for the following:

a. The rule followed by computer in a network for communication. Ans: Protocol 

b. Learning through internet. Ans: E-learning

 

3. Write the full form of the following:

a. MODEM: Modulator-Demodulator

b. W3C: World Wide Web Consortium

 

GROUP 'B'

4. Answer the following questions:

a. Write the difference between client/server and peer to peer network.

Peer-to-Peer (P2P) Network

Client-Server Network

A peer-to-peer (P2P) network is a network in which each computer acts as both client and server, sharing files and resources directly without a central server.

A client-server network is a network in which one or more servers provide services and resources to client computers.

In a P2P network, failure of one computer does not affect others.

In a client-server network, failure of the server affects all clients.

It does not require a system administrator.

It requires a network administrator.

It has low security and difficult data backup and recovery.

It has better security and easy centralized backup and recovery.

b. What is computer UPS? Give the importance of UPS to the computer system.

Ans: UPS (Uninterruptible Power Supply) is a battery backed device that gives temporary power during outages, letting you save data safely. UPS (Uninterruptible Power Supply) is important for a computer system because of the following reasons:

1) It provides backup power during outages, giving enough time to save data and shut down safely.

2) It stabilizes voltage and filters power, protecting the computer from surges, sags, or spikes.

c. What is cryptography?

Ans: Cryptography is the technique of protecting information by converting it into a coded form so that only authorized users can access or understand it. Types of Cryptography are: a) Encryption        b) Decryption

d. What is e-commerce? Write down advantages of it.

Ans: E-Commerce (Electronic Commerce) is the process of buying and selling goods and services online using the Internet. Advantages (Benefits) of E-Commerce are:

a) Shop 24/7 from anywhere with Internet access.

b) Easily compare products, prices, and reviews. 

e. What are the common models of e-commerce?

Ans: The common models (types) of e-commerce are:

1.       Business to Consumer (B2C)

2.       Business to Business (B2B)

3.       Consumer to Consumer (C2C)

4.       Consumer to Business (C2B) 

f. Write the difference between update query and select query.

Ans: The differences between update query and select query are as follows:

Select Query

Action Query

A Select Query is used to retrieve and display data from table without changing it.

An Action Query is used to make changes to data in table.

It does not make change to database.

It makes change to database.

It is used to view or analyze data.

It is used to add, update, delete, or create records.

Example: A Select Query can show all students in Grade 10.

Example: An Action Query can increase employees’ salary by 10%.

g. What is sorting? Write down two advantages of it.

Ans: Sorting is the process of arranging all the records in a table either ascending or descending order based on one or more fields.

Any two advantages of sorting are:

i) It makes it easier to find records quickly.

ii) It helps to analyse and compare data efficiently.

h. What is table? Which view use to create table?

Ans: A table is a collection of related data organized in rows and columns in a database. Database is composed of one or more tables. Design view is used to create table.

i. What is data type? Give examples.

Ans: Data type is a property in MS-Access which is used to define the kind of data that a field can store, such as text, numbers, dates, or objects. Examples of data types are: Text (Short Text), Memo (Long Text), Number, Date/Time.

 

5. Write down the output of the given program:

DECLARE SUB SERIES ( )

CALL SERIES

END

SUB SERIES

N$ = “*”

FOR 1 TO 5

FOR J=1 TO I

PRINT N$;

NEXT J

PRINT

NEXT I

END SUB

Ans: Dry Run Table:

N$

FOR 1 TO 5

J=1 TO I

PRINT N$

*

1 TO 5 Yes

1 TO 1 Yes

*

 

 

2 TO 1 No

 

 

2 TO 5 Yes

1 TO 2 Yes

*

 

 

2 TO 2 Yes

**

 

 

3 TO 2 No

 

 

3 TO 5 Yes

1 TO 3 Yes

*

 

 

2 TO 3 Yes

**

 

 

3 TO 3 Yes

***

 

 

4 TO 3 No

 

 

4 TO 5 Yes

1 TO 4 Yes

*

 

 

2 TO 4 Yes

**

 

 

3 TO 4 Yes

***

 

 

4 TO 4 Yes

****

 

 

5 TO 4 No

 

 

5 TO 5 Yes

1 TO 5 Yes

*

 

 

2 TO 5 Yes

**

 

 

3 TO 5 Yes

***

 

 

4 TO 5 Yes

****

 

 

5 TO 5 Yes

*****

 

 

6 TO 5 No

 

 

6 TO 5 No

Loop Exits

 

 

The output of the Program is:

*

**

***

****

*****

6. Re-write the given program after correcting the bugs:

DECLARE FUNCTION SQ$ (N)

CLS

FOR I=1 TO 10

DISPLAY SQ (N)

NEXT N

END

FUNCTION SQ (N)

SQ=N^2

END FUNNCTION

Ans:

Debugged Program:

DECLARE FUNCTION SQ (N)

CLS

FOR N=1 TO 10

PRINT SQ (N)

NEXT N

END

FUNCTION SQ (N)

SQ=N^2

END FUNCTION

 

7. Study the following program and answer the given questions: 2x1=2

DIM N (10)

DECLARE SUB MIN (N ( ))

CLS

FOR I=1 TO 10

INPUT "ENTER A NUMBER"; N (I)

NEXT I

CALL MIN (N ( ))

END

SUB MIN (N  ())

S=N (1)

FOR 1=2 TO 10

IF SN > N(I) THEN S=N (I)

NEXT I

PRINT "THE SMALLEST NUMBER=”;S

END SUB

a. Which is array variable in above program?

Ans: The array variable in above program is N.

b. Which is control statement in above program?

Ans: The control statements in the program are:

i) FOR...NEXT loop

ii) IF...THEN statement

 

 

 

 

 

 

 

 

8. Convert/Calculate as per the instruction:

a. (165)10 = (?)2                Ans: (10100101)2

b. (101111)2=(?)8             Ans: (57)8

с. (101001) x (101)          Ans: (11001101)

d. (1101110) / (1101)     Ans: Q=1000      R=110

 

9. Answer the following questions:

a. Write a program in QBASIC that asks length in meter then display length in centimeter by using FUNCTION. END FUNCTION and length in millimeter by using SUB.. END SUB.

[Hint 1 meter = 100 Centimeters 1 meter= 1000 Millimeters]

DECLARE FUNCTION MTC(M)

DECLARE SUB MTM(M)

CLS

INPUT "Enter Length in meter: "; M

PRINT "Length in centimeter: "; MTC(M)

CALL MTM(M)

END

 

FUNCTION MTC(M)

    CM = M * 100

MTC = CM

END FUNCTION

 

SUB MTM(M)

    MM = M * 1000

PRINT "Length in millimeter: "; MM

END SUB

 

b. Write a program to read records from file name "Rec.dat" and display all the records those post is manager. File contains field names are employees Name, Post, Date of birth, e-mail address and Salary.

OPEN "Rec.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

    INPUT #1, E$, P$, D$, M$, S

    IF UCASE$(P$) = "MANAGER" THEN

        PRINT "Employee Name: "; E$

        PRINT "Post: "; P$

        PRINT "Date of Birth: "; D$

        PRINT "E-mail Address: "; M$

        PRINT "Salary: "; S

    END IF

WEND

CLOSE #1

END

 

10. Write a program in C-language that ask length, breadth and height then display volume of box. [Hint: volume = LxBxH]

#include <stdio.h>

int main( )

{

    int l, b, h, v;

    printf("Enter the length of the box: ");

    scanf("%f", &l);

    printf("Enter the breadth of the box: ");

    scanf("%f", &b);

    printf("Enter the height of the box: ");

    scanf("%f", &h);

    v = l * b * h;

    printf("The volume of the box is %d", v);

    return 0;

}

 

OR

Write a program in C-language to display the series 5, 10, 15, 20, 25 up to 10th term.

#include <stdio.h>

int main()

{

    int a = 5, i;

    for (i = 1; i <= 10; i++)

    {

        printf("%d ", a);

        a = a + 5;

    }

    return 0;

}

 

 

 

SET 14: PRE-PABSON EXAMINATION 2082

Group ‘A'

1. Answer the following questions in one sentence:                    

a) Define network protocol.

Ans: A set of rules followed for interconnection and communication between computers in a network is called a protocol. Example: TCP/IP, FTP, SMTP.

b) List some areas where AI can help us.

Ans: Some areas where AI can help us are:

1.       Healthcare: Medical diagnosis and treatment planning

2.       Finance: Fraud detection and prevention

c) What is the size of YES/NO field in MS-Access?

Ans: The size of YES/NO field in MS-Access is 1 bit.

d) Write any two examples database management system?

Ans: Any two examples database management system are MS Access and Oracle.

e) What is the use of EOF( ) function?

Ans: The use of EOF( ) function to check whether the record pointer reaches at end of file or not.

f) Write any two-format specifier used in C language.

Ans: Any two format specifier used in C language are: %d (int) and %f (float)

 

2. Write appropriate technical term for the following:    

a) A device that connects two dissimilar networks. Ans: Gateway

b) Delivery of different services through the internet. Ans: Cloud Computing

 

3. Write the full form of the following:                              

a) G2B: Government to Business         

b) TCP/IP: Transmission Control Protocol/Internet Protocol

 

Group ‘B'

4. Answer the following questions:          

a) Differentiate between LAN and WAN (any two points).

Ans: The difference between LAN and WAN are:

LAN (Local Area Network)

WAN (Wide Area Network)

A LAN is a network that connects computers and devices within a small area such as a home, office, or school.

A WAN is a network that connects computers and devices over a very large area, such as a country or the whole world, often using satellite, microwave

It has low setup and maintenance cost.

It has high setup and maintenance cost.

It is owned and managed by an individual or organization.

It is owned and managed by multiple organizations.

Examples: Computer lab network, cybercafé network.

Examples: Internet, 4G mobile network, satellite communication.

b) What is cybercrime? Write two examples of cybercrime.

Ans: Cybercrime refers to illegal activities carried out using the computers, internet and digital technologies, such as hacking, phishing, cyberbullying, identity theft, online fraud and spreading malicious software. Any two examples of cybercrime are: phishing and hacking.

c) What is firewall? Why is it important in network security?

Ans: A firewall is a security system that monitors and controls incoming and outgoing network traffic to protect systems from unauthorized access and cyber threats.

It is important in network security because:

a)       Prevents unauthorized users from accessing a network or computer system.

b)      Controls and filters incoming and outgoing network traffic based on security rules.

d) Mention any two benefits and any two limitations of e-commerce.

Ans: Any two benefits of E-commerce are:

a) Shop 24/7 from anywhere with Internet access.

b) Easily compare products, prices, and reviews.

Any two limitations of E-commerce are:

a) No personal touch; cannot physically check goods before buying.

b) Requires Internet and devices; dependent on technology. 

e) What is virtual reality? List any two advantages of it.

Ans: Virtual reality (VR) is a technology that creates a simulated environment, allowing users to immerse themselves in a three-dimensional (3D) world that they can interact with.

Any two advantages of Virtual Reality: 

1.       VR makes playing games and exploring places more exciting because it feels real.

2.       VR helps students learn by letting them explore virtual ancient cities or cells.

f) What are field properties? Name any four of them.

Ans: Field properties are the settings of a field that control how data is stored, displayed, and entered in a table.

Any four field properties are: a) Field Size   b) Format   c) Default Value d) Validation Rule   e) Validation Text  

g) What are validation text and validation rules?

Ans: Validation Rule is a field property which is used to limit the values that can be entered into a field.

Validation Text is a field property which displays an error message that appears if the data entered is invalid according to the specified validation rule.

h) What is query? List the different type of query.

Ans: Query is one of the MS-Access database objects that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Types of query are:

1. Select Query

2. Action Query (Append, Update, Delete and Make Table)

i)  What is the importance of forms and reports in MS-Access.

Ans: The importance of form is to provide graphical interface to view, modify and add data in a table or multiple linked tables.

The importance of report is to present information in an effective and organized format that is ready for printing.

 

5. Write down the output of the given program.    

DECLARE SUB Show (ABC$)

CLS

ABC$=”MAZNEGBT”

CALL Show (ABC$)

END

SUB Show (ABC$)

Y=48

FOR I=1 TO 4

N=Y MOD 7

PRINT MID$(ABC$, N, 1)

Y = Y – 1

NEXT I

END SUB

Ans:

ABC$                 Y=48           I          N         OUTPUT

MAZNEGBT       47                1          6              G

                            46                2          5              E

                            45                3          4              N

                            44                4          3              Z

                         

The output of the program is

      G

      E

      N

      Z

 

6. Re-write the given program after correcting the bugs:        

REM to count total no. of passed student

WHILE NOT EOF( )

OPEN “pab.txt” FOR OUTPUT AS#1

INPUT#2,ID,M1,M2,M3

IF M1>=32, M2>=32, M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL RECORD";X

END

Ans: Debugged Program:

REM to count total no. of passed student

OPEN “pab.txt” FOR INPUT AS#1

WHILE NOT EOF(1)

INPUT#1,ID,M1,M2,M3

IF M1>=32 AND M2>=32 AND M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL RECORD";X

CLOSE #1

END

 

7. Study the following program and answer the given questions:   

DECLARE FUNCTION TOT(N$)

INPUT "Enter a word"; R$

X=TOT(R$)

PRINT X

END

FUNCTION TOT(N$)

FOR K=1 TO LEN(N$)

Y$=MID$(N$,K,1)

IF UCASE$(Y$)="A" THEN

X=X+1

ENDIF

NEXT K

TOT=X

END FUNCTION

a) List any two library functions used in above program.

Ans: Two library functions used in above program are UCASE$( ) and MID$( ).

b) Write the use of variable "X" in line 3 [i.e. X=TOT(R$)]

Ans: The use of variable "X" in line 3 [i.e. X=TOT(R$)] is to store the value (occurrence of character “A”) returned by TOT(R$) function.

 

Group ‘C’

8. Convert / calculate as per the instruction:

i) (101011 + 1101 ) - ( 10011 )    

ii) ( 11011 × 11 ) + (101)

iii) ( 235 )10  into octal                 

iv) ( 9A5 )16 into binary

Ans:

i) 100101                             ii) 10101102​

iii) 353  in octal                  iv) 1001 1010 0101 in binary

 

9. a) Write a program in QBASIC that asks two numbers to find sum of squares of two numbers using SUB…. END SUB program and average of two numbers using FUNCTION…END FUNCTION.

DECLARE SUB SSQ (A, B)

DECLARE FUNCTION AVERAGE (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

PRINT “AVERAGE OF TWO NUMBERS”; AVERAGE (A, B)

CALL SSQ (A, B)

END

FUNCTION AVERAGE (A, B)

AVERAGE = (A + B) / 2

END FUNCTION

SUB SSQ (A, B)

SUM=A^2+B^2

PRINT "SUM OF SQUARE OF TWO NUMBERS ARE:"SUM

END SUB

 

b) Write a program to open data file detail.dat which may contain name, address, gender and salary. The program should allow user to add few records on it.

OPEN "detail.dat" FOR APPEND AS #1

DO

    INPUT "Enter name "; N$

    INPUT "Enter address "; Ad$

    INPUT "Enter gender "; G$

    INPUT "Enter salary "; S

    WRITE #1, N$, Ad$, G$, S

    INPUT "Do you want to add more records (Y/N) "; Y$

LOOP WHILE UCASE$(Y$) = "Y"

CLOSE #1

END 

 

10. Write a program in 'C' to check whether a number is odd or even.

Ans:      

#include<stdio.h>

int main( )

{

      int a;

      printf(“Enter any number”);

      scanf(“%d”, &a);

      if (a %2==0)

      printf("It is EVEN");

      else

      printf("It is ODD");

      return 0;

 }

OR

Write a program in ‘C' language to display the series with their sum. 2,4,6,8,….., up to 10th terms.

#include<stdio.h>

int main( )

{

int a=2, s=0, i;

for ( i=1;i<=10;i++)

{

printf("%d",a);

s=s+a;

a=a+2;

}

printf("%d",s);

return 0;

}