SEE Computer Science 2076
Networking and Telecommunication
Questions and Answers [70]
Communication
Communication is sending and receiving information between two or more persons.
Telecommunication [MFT 2075]
Telecommunication is a system of transmission of sounds, images, texts or data in the form of electronic signals.
Data Communication [SLC 2067]
Data communication is a process of transferring data electronically from one place to other using different transmission mediums. Eg. E-Mail, Chat and phone calls.
Components of Data Communication.
i) Data ii) Sender iii) Medium iv) Receiver v) Protocol
Medium
A path through which the sender makes communication to the receiver is known as medium.
Protocol [MFT 2075]
Protocol is a set of rules by which computers on the network communicate with each other.
E.g. TCP/IP, SMTP, HTTP etc.
Data Transmission Mode [MF 2076]
Data transmission mode is the way of transmission of data from one location to another. There are three types of transmission mode:
i) Simplex mode
ii) Half duplex mode
iii) Full Duplex Mode
Simplex mode [MF 2076]
The transmission mode in which transmission of data can take place in one direction only is called simplex mode.
E.g.: Newspaper, Radio and Television.
Half duplex mode [MF 2076]
The transmission mode in which transmission of data can take place in both directions but only in one direction at a time is called half duplex mode.
E.g.: Wireless handset and walkie-talkie.
Full duplex mode [MF 2076]
The transmission mode in which data can be transmitted in both directions simultaneously is called full duplex mode.
E.g.: Telephone, internet etc.
Bandwidth [SEE 2066 S]
Bandwidth can be defined as the maximum volume of data that can be transmitted through a communication system.
We can measure bandwidth in digital devices by bits per second and in analogue devices by cycles per second or Hertz (Hz).
Transmission medium / Communication Channel [SLC 2070 S] [SEE 2074 U] [MM 2076] [MFT 2075]
Transmission medium is a pathway that can transmit information from a sender to a receiver through wired or wireless medium on a network.
The types of communication medium are:
i) Guided Medium (Bounded or Wired)
ii) Unguided Medium (Unbounded or Wireless)
Guided medium [SEE 2074 U]
The transmission media which comprises of cables or wires through which data is transmitted is called guided medium. They are called guided since they provide a physical channel from the sender device to the receiver device. The signal travelling through these media are bounded by the physical limits of the medium.
E.g.: twisted pair cable, co-axial cable, fibre optics cable, etc.
Features of guided media: [SEE 2075]
- Data transmits through the physical cable or fixed path
- Data transmission rate is higher.
Unguided medium [SEE 2074 U]
The transmission media which transfer data in the form of electromagnetic waves that do not require any cables for transmission is called unguided medium. These media are bounded by geographical boundaries.
E.g.: radio wave, microwave, infrared etc.
Twisted pair cable
A pair of wires twisted with each other is known as twisted pair cable. A set of four pairs of twisted wires are bundled to form cable. These are the most common medium for LAN. Wires are twisted with each other so as to reduce crosstalk (A disturbance caused by electromagnetic interference, along a circuit or a cable pair).
Its types are:
a) Unshielded Twisted Pair Cable
b) Twisted Pair Cable
Unshielded twisted pair (UTP)
Unshielded twisted pair is a popular type of cable that consists of two unshielded wires twisted around each other which are used in telephone wiring and local area networks (LANs). It is called unshielded because it has no additional foil wrap, or shield.
RJ-45 connector is commonly used with unshielded twisted pair.
Shielded twisted pair (STP)
Shielded twisted pair is a type of copper telephone wiring in which each of the two copper wires are twisted together and coated with an insulating coating. The extra covering in shielded twisted pair wiring protects the transmission line from electromagnetic interference.
D-shell connectors are used with shielded twisted pair.
Co-axial cable
Coaxial (or “coax”) cable is a common type of cable used for transmitting data over long distances. They are most commonly used to transmit cable TV and Internet signals.
The connectors used with co-axial cables are BNC, T-connectors and terminators in bus topology.
10 Mbps is the maximum speed of co-axial cable.
Fiber optic cable
Fiber optics cable is one of the costlier cables used in data communication which uses light to carry a data signal through the cable.
The connectors used in fiber optics are Screw Mounted Adaptors (SMA), Spring-loaded Twist (ST), SC and FC.
It is costlier to maintain, produce and install.
Radio wave transmission
The transmission making use of radio waves through air is called radio wave transmission.
It provides low bandwidth for data communication.
Radio, TV, cellular phones etc. uses radio transmission in one form or another.
The radio waves can travel through walls and through an entire building.
Depending upon the frequency, they can travel long distance or short distance.
It does not require line of sight for data transmission
Microwave transmission
Microwave is a line-of-sight wireless communication technology that uses high frequency beams of radio waves to provide high speed wireless connections that can send and receive voice, video, and data information.
Microwaves do not pass through buildings. So, indoor receivers cannot be used effectively.
It provides higher bandwidth for data communication.
It requires line of sight for data transmission.
Infrared transmission
Infrared Transmission is the transmission of data or voice information over infrared (IR) light over short ranges.
It requires line-of-sight and is unable to break through walls.
Computer network [SLC 2066] [SLC 2068 S] [SLC 2069 S] [SLC 2070 S] [SLC 2071 S] [SEE 2074]
[MF 2076]
A computer network means two or more computers connected with each other to share data, hardware, software and other resources.
Advantages of computer network [SLC 2065 S] [SLC 2069] [SLC 2071 S] [SEE 2075 S2] [MF 2076]
[MFT 2075]
Computer in a network can access the network-connected hardware devices like printers, disk drives, etc.
Data in a network environment can be updated from any computer. Updated data can be accessed by all computers on the network.
Computers in a network system share different software packages.
Information can be exchanged rapidly in computer network.
Disadvantages of computer network [SEE 2075 S2] [MF 2076] [MFT 2075]
The sharing of information may leak the privacy of other clients.
The networking cost is high
If hardware or software malfunctions, it affects the whole network.
Data and information may be stolen by computer hackers if the security of network is not reliable.
Services of computer network.
Directory services
File services
Application services
Communication services
Reasons of keeping computers on the network [SLC 2070 S]
To share hardware devices like printers, scanners, hard disks etc.
To share data, information and programs.
To communicate with each other.
Goals of computer network
Resource sharing and Reliability
Communication medium
Access to remote database
Easy data transfer
Computer Network reduces expenses of an office. Justify this statement with an example.
Computer Network reduces expenses of an office because computer on a network share different hardware devices like printers, scanners, hard disk etc. And sharing those hardware devices will reduces the expense of an office. For example if there are twenty computers in an office, now for printing the data there is no need to buy twenty printers individually rather than simple network the computer and connect the printer on the network which helps in sharing of the one printer among twenty computers which reduces the cost of buying nineteen printers individually.
Computer network makes the world a small place. Justify.
Computer network makes the world small place. It is true because in computer network we can know about the events and things place outside or inside the country sitting within a room. And we also can communicate with our relatives who are far away from us or has gone to abroad for job or study. Therefore, computer network makes the world a small place.
Hardware components of a computer network (Elements of Network)
Physical parts and devices used to connect computers in the network environment are called hardware components. The hardware components of computer network are
Computer system (Server or Workstation) b) Network connectors c) Network cables
d) NIC Card e) MODEM f) Hub g) Bridge
h) Switch i) Router j) Gateway k) Repeater
Server
A server is the main computer that provides services, data and other resources to the other computers in the network environment. Network operating software used by server is Novell Netware, Linux, Unix etc. Different types of servers are file server, print server, application server etc.
Workstation
Workstation is a computer network that utilizes network resources. Network operating software used by workstation are Windows 98, Windows XP etc.
Node
Each computer or device of network is called node.
Router [MFT 2075]
Router is an intelligent device that connects two different networks which uses the address for filtering and forwarding the data as well as it has an ability to determine the best route for destination.
Network Interface Card (NIC) [SQE 2075K]
A Network Interface Card (NIC) is the adapter through which the computer is connected to the network. The function of NIC is to convert data into electronic signals and transfer them through cables and vice-versa. The advantage is to present the platform for a communication between the computers within a network.
Cable
Cables are commonly used media of physical channel for transmitting data between computers in network. Examples of cables are coaxial, twisted pair and fiber optic cable.
Connector
Connector is an interface between the NIC of the computer and the cable that passes data between computers in network. Examples of connectors are BNC used with coaxial cable, RJ 45 used with UTP cable, ST used with fiber optic cable etc.
Hub [MF 2076]
A hub is a network device with multiple points or ports which acts as a central point from where different computers and other devices are connected. It broadcasts all network data across each connection.
Hub is mostly used in physical star topology.
Switch [MF 2076]
A switch is a networking device that has multiple connecting ports which is often used interchangeably with the bridge.
Bridge
A bridge is a device that connects two or more similar types of network which filters the data or inspects incoming signals and decides whether to forward the signals or discard them.
Gateway
Gateway is an interconnecting device that connects two dissimilar networks
Repeater
Repeater is a device that amplifies the incoming signals, creates a copy of it and transmits the signal on network.
MODEM [MFT 2075]
MODEM is a device which is used to transfer the data of one computer to another computer using telephone lines.
The role of MODEM in data transmission is that it transfers data from one computer to another through telephone line. It also converts the digital signal into analog and vice versa.
Importance of MODEM [SLC 2064] [SLC 2071 S] [SEE 2073 U]
MODEM modulates the digital codes of the computer into analog signal, which then can travel through the telephone cable. At the receiving end the MODEM kept there will demodulate the analog signal to digital codes, which can be then understood and used by the receiving computer. In this way a MODEM makes the computer network possible.
Modulation
The process of translating digital signals of a computer to analog signals, which are then transmitted across the standard telephone lines, is known as modulation.
Demodulation
The process of translating analog signals from a phone line and converts then into digital signals for the computer is known as demodulation.
Software components of a computer network
Network protocol
Network operating system
Device driver
Network operating system [PMT 2075K]
Network operating system is a set of computer program that manages the resources on network. E.g. Novell network, Microsoft Windows NT, Linux, Unix etc.
Device driver
Device driver is a program that controls the functionality of the hardware device.
Types of Network
LAN (Local Area Network)
MAN (Metropolitan Area Network)
WAN (Wide Area Network)
LAN (Local Area Network)
A LAN is a type of network which covers small area i.e. within a room, building, or short distance by using cables or small wireless devices. It is controlled by a single organization. It uses private connection media. E.g.: network in a school, college or cyber cafe. The diameter is not more than a few kilometres. LAN offers bandwidth of 10-100 Mbps.
MAN (Metropolitan Area Network)
A MAN is a type of network which covers an entire city. It is controlled by single or group of organization. It uses private or public connection media. E.g.: interconnection between different branches on same branch and ISP providing internet services. It offers a number of network services compatible with bandwidth from 128 kbps to 1 Gbps.
WAN (Wide Area Network)
A WAN is a type of network which connects two or more computers generally across a wide geographical area such as cities, districts, and countries. It is controlled by group of organization. It uses public connections media like telephone lines, satellite links or microwave system to connect several LANs and MANs. E.g. internet. Data transmission in WAN is slower than LANs and WANs.
Network topology (LAN topology) [SLC 2064] [SLC 2065 S] [SEE 2066 S] [SEE 2067 S] [SLC 2068]
[SLC 2070] [SEE 2072] [SEE 2075U]
The arrangement or connection pattern of computers or nodes and other devices of the network is called network topology. The three basic topologies are bus topology, ring topology and star topology
Bus topology
The network topology in which computers and other devices are arranged in linear format which uses a common backbone or wire to connect all the computers and devices is called bus topology.
Diagram of bus topology [SEE 2067 S] [SLC 2069 S]
Advantages of bus topology [SEE 2073]
It is easy to set up computers and other devices in bus topology, because all the devices are connected through a single wire.
It requires fewer cable media, so it is cheaper than other topologies.
It is easy to add new node to the network.
Failure of one workstation does not affect other computers on the network.
Disadvantages of bus topology
The whole network system collapses if the cable or backbone is damaged.
The network slows down if additional computers are connected.
The limited length of the cable in a network may restrict to connect the workstation or devices.
It is difficult to find fault in this network topology.
Ring topology [MF 2076]
The network topology in which computers are connected in the shape of a circle without any end points is called ring topology. Each workstation contains two neighbours for communication or an input and output connections.
Diagram of ring topology [SEE 2072] [MF 2076]
Advantages of ring topology
i) It is easy it set up and configure.
ii) Each computer gets equal opportunity to access the network resources.
iii) It supports high data transmission rate.
iv) Performs better than a star topology under heavy network load.
Disadvantages of ring topology
i)Failure of any cable or single computers may affect the entire network.
ii) It is difficult to detect the errors.
iii) Adding/removing the devices affect the entire network.
iv) Much slower than an Ethernet network under normal load.
Star topology [SLC 2065] [U1]
The network topology in which all computers or other devices are connected through a central device through a central device called hub or switch is called star topology.
Diagram of star topology [SLC 2064] [SLC 2065] [U1]
Advantages of star topology
i) Easy to set up and configure.
ii) Failure of single computer or cable doesn’t affect the entire network.
iii) It is easy to find the fault.
iv) It is easy to extend to network by attaching new devices to the central devices.
Disadvantages of star topology
i) It requires more cable in comparison of bus topology so it is more costly.
ii) Failure of central devices (hub or switch) break down the whole system.
Network architecture (Models of Computer Network)
The arrangement of the computers on the network which is based on the computing model is called network architecture. Its types are
Centralized computing network
Client / Server Network
Peer to Peer Network
Centralized computing network [SQE 2074K]
A centralized computing network is a network in which a central host computer performs data processing and storage on behalf of clients. It is different from client server network as client server network consists of at least one server and one or more client as well as client server provides high security of data and other resources.
Client/server network [SLC 2071]
Client/ server network is a type of network architecture that consists of at least one server and one or more clients or workstations, where users do their work. It provides central security administration and the network administrator is responsible for data security and other resources management of the network.
Peer-to-peer network [SLC 2071]
Peer-to-Peer network is a group of computers, which function both as servers and workstations to share data, information and other resources of the network. It lacks centralized network administration, where the network administrator needs to manage security on each computer. It provides no reliable security and might put data in higher risks.
MCQ (Multiple Choice Questions) [85]
Data communication means:
a) We can easily send and receive the message b) Data computing system is fastest in network
c) The process of transferring data and information d) None of above
The term network basically refers to:
a) Communication b) Interconnection c) Sharing d) All of them
Which of the following are is not a goal of computer networks?
a) Resource sharing b) High reliability c) Scalability d) None of the above
Which one of the device is simplex?
i. Television ii. Telephone iii. Computer iv. Walkie-Talkie
TV broadcasting is an example for data transmitting
i. Half-duplex Mode ii. Simplex Mode iii. Full duplex mode iv. None of them
Which refers to the communication media: [SLC 2065] [SLC 2071 S] [SLC 2064]
a) UTP Cable b) Fiber optics cable c) Satellite d) All of above
Which is not a communication media? [SEE 2075 U]
a) NOS b) Satellite c) Infrared d) STP
Which is not a communication media? [SLC 2067]
a) Wire b) Microwave c) Satellite d) NIC
Which is not unguided media? [SLC 2069]
i) Fiber optics ii) Microwave iii) Infrared iv) Radio wave
Which is NOT a guided media? [SLC 2066 S]
i) UTP Cable ii) STP Cable iii) Satellite iv) Fiber Optics
Which of the following is not a guided data communication media? [SLC 2068 S]
i) Coaxial cable ii) Fiber optic iii) twisted pair iv) Satellite
Which transmission media is not used for guided transmission media?
a) Fiber Optic b) Coaxial Cable c) RJ45 d) Satellite
Which one is an example of bounded media? [SLC 2067 S] [SLC 2070] [MFT 2076]
i) Fiber optics ii) Microwave transmission iii)Laser transmission iv) infrared transmission
Which one is an example of unbound media? [SLC 2071 S]
i) UTP cable ii) Microwave transmission iii) Fiber optic cable iv) All of the above
Unbounded communication medium is ......... [MFT 2075]
i) Satellite ii) Dial Up iii) Fiber Optics iv) UTP
An example of guided media_______
a) Radio wave b) Infrared c) Fiber Optics d) Micro wave
In which communication media data transfer high? [SLC 2068]
i) Twisted pair ii) Co-axial cable iii) Fiber optics iv) Microwave
Fastest and high bandwidth data communication medium is: [SEE 2074 U]
a) Optical fiber b) Twisted Pair c) Coaxial Cable d) Telephone Line
Media used to transfer data in forms of light? [SLC 2070 S]
i. Microwave ii. Fiber optical iii. Radio wave iv. Satellite
Microwave and Infrared technology are related with:
a) Unbounded media b) Bounded Media c) Confounded d) Hot Bounded
A form of wireless transmission in which signals are sent via pulses of infrared light.
i) Radio networking ii) Infrared transmission iii) Microwave transmission iv) None of the above
Which is the connector of UTP cable?
i. BNC ii. T-Connector iii. ST connector iv. RJ-45 connector
Which is the connector of coaxial cable.
i. RJ 45 ii. BNC iii. ST iv. None of them
Which of the following is not Media connector?
i. BNC ii. terminator iii.RJ-45 iv.NIC
The device used for connecting PC to telephone line is
i) CD-ROM ii) MODEM iii) Printer iv) Port
A device that converts the discrete stream of digital ON-OFF electric pulses used by computer into the continuously variable analog wave patterns used to transmit the human voice over many existing telephone lines.
i) Modem ii) Bridge iii) Gateway
In binary number systems 1 and 0 means ........ [SEE 2074 U]
(i) ON, OFF (ii) YES, TRUE (iii) OFF, NO (iv) YES, ON
Modem converts ______________ [SLC 2066 S]
a) Sound into digital b) Digital signal into sound c) Both (i) and (ii) d) None of above
The process of converting analog signals into digital signals [MFT 2076]
Modulation b) Demodulation c) Both d) None
The process of converting digital signals into analog signals. [MFT 2075]
i) Modulation ii) Demodulation iii) Both i) and ii) iv) None of them
The speed of Modems is measured in terms of
i. mbps ii.bps iii. kbps iv. bits
Which device is used to connect multiple networks that uses the same protocol. [SLC 2074]
(i) Bridge (ii) NIC (iii) Switch (iv) Gateway
Which of the following is used to connect totally dissimilar networks?
i) Router ii) Bridge iii) Gateway iv) None of the above
A networking device that joins multiple networks having different protocols is_ [MFT 2076] [MFT 2075]
i. Switch ii. Router iii. Gateway iv. Bridge
Which is not a network device?
a) Hub b) Repeater c) Switch d) TCP/IP
Which is not a physical component of computer network ?
i) Cable ii) NIC iii) Network OS iv) Hub
Which is not network hardware component?
i. HUB ii. Repeater iii. Router iv. Windows NT
The hardware components of a network. [MM 2076]
i) NOS ii) LAN iii) Switch iv) All of them
Which is the component of a network?
i. MSDOS ii. Hub iii. Volt guard iv. None of them
A network device that amplifies the incoming signal creates a new copy of it and transmits. [MM 2076]
a) Hub b) Bridge c) Repeater d) Router
A network navigation device that merely retransmits a signal to all other nodes attached to it:
a) Router b) NIC c) Hub d) Adapter
A device that lets you link two networks together.
i. Switch ii. Hub iii. Router iv. None of above
NIC is a ....... [SEE 2073 U]
(i) Software (ii) Hardware (iii) HUB (iv) Network operating system
Which of the following device is multi ports repeater?
a) Hub b) router c) bridge d) Gateway
Any network device that can connect to the network and can generate ,process or transfer network data.
a) Node b) Client c) Peer d) None
A __________ is the card that physically makes the connection between the computer and the network cable.
a) Network cables b) Network connector c) NIC d) None
Which is not the network operating system:
a) Linux b) UNIX c) MS-DOS d) Windows Server 2012
Which is Network operating system(NOS)? [SLC 2064]
a) Linux b) Windows XP c) MS-DOS d) All
Which is the network operating system used in a server computer?
a) Windows XP b) Windows Vista c) Windows NT server d) None of them
Which one is an operating system software? [SLC 2070]
a) MS-Word b) MS-Excel c) Firefox d) MS-DOS
Protocols in network means
a) Language for communication between computer b) Rules for exchange of message between two or more hosts c) Both d) None of the above
Which of the following is not a protocol? [SLC 2068] [SLC 2074]
a) POP b) TCP/IP c) NOS d) FTP
Which is not a network protocol?
a) TCP/IP b) HTTP c) LAN d) FTP
Which of the following is not a protocol?
a) TCP/IP b) IPX/SPX c) NETBIOS/NETBUI d) Client
Which is not the network protocol? [SQE 2074K]
a) TCP/IP b) STP c) FTP d) SMTP
Which is not a protocol? [SEE 2073 U]
a) FTP b) POP c) HTTP d) TIP
Which of the following is protocol?
a) TCP/IP b) HTTP c) FTP d) All of them
The communication protocol used to connect to web servers on the internet or on a local network (intranet).
a) TCP/IP b) HTTP c) SMTP d) POP
_______ is the protocol used to send email:
a) HTTP b) SMTP c) POP d) FTP
Which protocol is used to receive mail from mail server?
a) POP b) FTP c) HTTP d) SMTP
Which of the following networking solution is suitable for networking within a building?
a) WAN b) LAN c) MAN d) None of above
A network of computer spread over a city or town located in the same geographical area.
a) LAN b) MAN c) WAN d) CAN
A telecommunication network, usually used for connecting computers, that spans a wide geographical area.
a) LAN b) MAN c) CAN d) WAN
Connection of computer between two different cities. [MFT 2076]
a) WAN b) MAN c) WLAN d) Wi-Max
Connection of computer between two different countries. [MFT 2075]
a) WAN b) MAN c) WLAN d) Wi-Max
Which type of network is used in the internet?
a) LAN b) MAN c) CAN d) WAN
Which of the following topologies share a single channel on which all stations can receive and transmit the data?
a) LAN b) BUS c) TREE d) None of the above
Physical structure of computer network. [SEE 2075]
a) protocol b) Topology c) MAN d) cabling
Which is not a network topology? [SLC 2066]
a) STAR b) Ring c) Client / Server d) BUS
In ......... Network Topology, nodes are connected in a single wire. [SEE 2073 U]
a) Star b) Bus c) Mesh d) All of the above
Which of the following topologies is least affected by addition/removal of a node?
a) Star b) Ring c) Bus d) None of the above
In which topology network devices are connected through hub? [SLC 2067] [SEE 2075] [PMT 2075]
a) Ring topology b) Bus topology c) Star topology d) None of the above
Token passing system is used in _____ topology.
a) Star b) Ring c) Bus d) Mesh
The network architecture used in most home networks is:
a) Client-server LAN b) Peer-to-peer LAN c) Client-server WAN d) Peer-to-peer WAN
A _______ is a self-sufficient computer that acts both as a server and a client to other similar computers on the network.
a) Node b) Client c) Peer d) None
A group of computers that functions both as a client and as a server.
a) Centralized computing b) Client/server c) Peer-to-peer d) Local Area Network
In which of the following network model all the computers have equal access?
a) Peer-to-peer network b) apple talk network c) Client/server network d) None of the above
A specialized network device on a host-based network that transmits the data entered by the user to the host for processing and displays the results.
a) Client b) Network Server c) Terminal d) None of the above
A centralized computing network is a type of network where all the users connect to a host computer that is the acting agent for all communication.
a) Peer-to peer b) Client/server c) Both d) None of the above
A network in which a central host computer performs data processing and storage on behalf of clients.
a) Centralized computing network b) Client/Server network c) Peer-to-peer network d) None
Which of the following acts as the central authority in the network?
a) protocol b) client c) server d) none of the above
A server in LAN is a
a) Device offering service to user b) NIC c) Workstation with huge secondary storage d) None of the above
A dedicated server that manages printers and printing jobs is_
a) Network Server b) Printer Server c) Modem Server d) File Server
The maximum speed at which data can be transmitted between two nodes on a network.
a) Bit rate b) Bandwidth c) Band length d) None of them
The bandwidth of digital signal is measured in¬_
a) Hertz b) Cycle per second c) Bits per second d) None of the above
Fill in the Blanks [30]
Telecommunication is a system of transmission of sounds, images, texts or data in the form of electronic signals.
Telecommunication is a transmission of data and information between computers using a communication link such as a standard telephone line.
The interconnection of computers with or without wires in order to share information is called computer network.
Computer network is a communication system connecting two or more computer that work together to exchange information and share resources.
The server computer is used to serve data and information.
A server is a computer designed to process requests and deliver data to other (client) computers over a Local Network or the Internet.
The server computer acts as the storehouse and distributor for the data, information and programs.
A peer is a self sufficient computer that acts both as a server and a client to other similar computers on the network.
A computer on a network that uses resources of the network is workstation.
A peer to peer network is a group of computers that function both as client and server.
A centralized network is a network in which a central host computer performs data processing and storage on behalf of clients.
The wireless technology used for long distance is called microwave transmission.
Cat 5 cable is used with RJ-45 connector.
Microwave is a wireless technology that can be used to transmit data between two different computers.
A set of rules used to define communication is called protocol.
Protocol is a set of rules that governs the communications between computers on a network.
The smallest area covers by network is called LAN
The network of computer within the room, building or campus is LAN.
A MAN is a network that interconnects users with computer resources in a geographic area or region larger than that covered by even a LAN but smaller than the area covered by a WAN.
The computer network of any two countries is WAN.
The example of WAN is internet .
HUB is a hardware device used to connect several computers together.
Router is a device connecting two or more networks that facilitates the transfer of data in the form of packets.
Gatewayis a device software or a system that converts data between dissimilar network with different protocols.
Simplex mode communication is a mode of transmission in which data flows in one direction only.
Modes for transmitting data from one device to another are simplex, Half-duplex, and full-duplex mode.
Full-duplex mode means two-way communication system. [SLC 2064]
Bandwidth is measured in bits per second.
A topology refers to the shape of the network in which all the computers are connected together.
A physical ring topology is a network topology in which network nodes are connected in a continuous circle.
True / False [70]
A computer network is just used for resource sharing. False
It is possible to share hardware resources on a computer network. True
Computer network reduces the cost. [SLC 2073] True
Computer network cannot transfer multimedia contents. False
Computer Network can share both hardware and software resources. True
Networked computers allow easy transfer of data from one computer to another. True
Computer network only allows us to share computer hardware. False
In a computer network, the data is passed from one computer to another by means of cables or satellites. True
The computers in a network system share only software packages. False
Computer network increases worker productivity and offers tremendous convenience. True
You can send message from one computer to another computer on the network. True
A peer-to-peer network is a simple, inexpensive network designed to connect computers together using twisted pair cable or coaxial cable. True
Peer-to-peer is a network model which has more security than client server. False
In client/server network architecture the resources are distributed to different terminals. False
Nodes are also called workstations. True
A workstation is a computer that uses the service of the network. True
A node is the primary data path that can carry large amount of data traffic. False
A server computer acts as the storehouse and distributer for the program data and information. True
A server is a network computer that utilizes the resources of other network computers, including other clients. False
Each computer or device in a network is called node. True
A network connector is defined as a device that facilitates the connection or the interconnection of computers and other device to a network. True
A hub is also called multiport repeater. True
HUB provides power backup in the event of power cut on the network system. [SLC 2064] False
A hub is a device that amplifies a signal being transmitted on the network. False
A repeater is a network device that regenerates electric signals. True
Bridge connects two dissimilar networks and carried out protocol conversion if needed. False
A bridge is a network device that connects different LAN segments using the same access method. True
Router is a network device used to regenerate or replicate a signal. False
Router provides power backup if there is power cut in the network system. [SEE 2075 S2] False
A gateway is a network device which connects two dissimilar networks together. True
Star topology uses a single cable as a backbone from where all other nodes are connected. False
It is difficult to identify and isolate the failure node in ring topology compared to star topology. True
Bus topology requires more media than other topology. False
In BUS Network Topology, nodes are connected in a single wire. [SEE 2075 S2] True
STAR topology is the most popular network topology used to connect computers. True
In the star topology computers must be arranged in the form of star. False
A physical ring topology is a network topology in which network nodes are connected in a continuous circle. True
Normally there is more transmission error rate in unguided transmission media than guided transmission media. True
Wireless Access Point is a device that provides connection between wireless devices and can connect to wire networks. True
In the wired network, computers are connected with each other through wires. True
Guided transmission media does not use cables. False
RJ-45 is the connector for co-axial cable. False
Coaxial cable has much greater bandwidth than fiber optic cable. False
There is possibility producing more crosstalk in twisted pair cable than coaxial cable. True
Fiber optics uses light to carry a data signal through cable. [SLC 2064] [SLC 2065 S] True
Fiber optic is one of the cheapest networks. False
Data transfer rate is higher in optical fiber cable than co-axial cable. [SLC 2072] True
Microwave transmission is an example of bound media. [SLC 2073] False
Microwave signals travel in straight line and cannot pass through obstacles like buildings, hills, etc. True
Protocol is the computer language only understood by computer. True
Protocol is required to transfer data between two computers. True
Protocols are not required to exchange data between two different computers. False
HTTP is an internet based standard for retrieval of email by user from an email server. False
Network operating system is a formal description of messages formats and the rules that two or more machines must follow to exchange those messages. False
A MODEM is a central network device that connects network devices in a star topology. False
MODEM is necessary to access the internet. [SLC 2064] [SLC 2065 S] True
MODEMS are not needed in wireless network communication. True
Modem can convert digital signal into analog signal and vice versa. True
Wire communication is suitable for Local Area Network. True
The network that covers small area is called PAN. False
Local Area Network is a network that spans multiple geographical locations. False
A computer network that covers small local area is MAN. False
A metropolitan area network (MAN) is a network of computers between two different cities. False
Metropolitan Area Network connects two or more LAN together with in a large city or state. True
Internet is an example of WAN. True
Wide Area Network (WAN) is a geographically dispersed telecommunication network. True
WAN uses guided transmission media like microwave or radio wave. False
Connecting computer between two different countries is an example of WAN. True
In half duplex mode of communication, data can be transmitted in both directions simultaneously. False
Walky - Talky is the example of full duplex mode. [SLC 2072] False
Technical Terms [65]
Sending or receiving information between two or more persons. Communication
A system of transmission of sounds, images, texts or data in the form of electronic signals. Telecommunication
The process of transferring digital data or information between computers. [MFT 2076]. Data Communication
Network sharing and exchanging information between different people. [SLC 2070 S] Computer Network
A group of the interconnected computers. Computer Network
The interconnection between two or more computers through physical and logical components to share resources. Computer Network
The path through which the sender makes communication to the receiver. Medium
A path through data is transmitted from one computer to another. Communication Medium
A network of computers formed by using cables. Wired Network
A network of computers formed by using unguided media. Wireless Network
Medium that carries data without physical path. [SQE 2074K] Unbounded Media
The data or signals transmitted through the air in the communication. [MFT 2076] Unguided Media
A transmission medium through which data are transmitted in the form of light. Fiber Optic
The amount of data transmitted per second through a communication channel. Bandwidth
The data carrying / handling capacity of communication channel. [SLC 2068 S, 2071] [MM 2076] Bandwidth
The volume of bits that can be transferred per second through the communication media. [SEE 2075] Bandwidth
A device used at end user’s computer in a network which converts digital signal into analog and vice-versa. MODEM
The device used to connect PC with telephone line. [SLC 2068] MODEM
The conversion of digital signals into analog signals. Modulation
The conversion of analog signals into digital signals. Demodulation
A card used to connect network cable to computer. [SLC 2066 S] [SEE 2071 S] NIC
A hardware device that provide common wiring point in LAN. [MFT 2075] Hub
A network device that retransmits signals to all nodes on the network. Hub
A multiple port repeater. Hub
A network device that retransmits signals to a destination node on the network. Switch
A network device that connects the segments of the same or different network having same protocol. Bridge
A network device that can determine the best path for forwarding the data packets. Router
A device that forwards signals between networks in networks in network traffic. Router
An intelligent device that connects two different networks by setting best network traffics. Router
A device that can connect networks which may use different communication protocols. [SEE 2073 U] Gateway
The device which is used to connect two dissimilar network topology. [SEE 2075 S2] Gateway
The device which accepts weak signals regenerates them and sends them back on their way. Repeater
A device that amplifies the incoming signals creates a new copy of it and transmits the signals on the network. Repeater
The device that connects communication media with network devices. Connector
Interface between the NIC of the computer and the cable that passes data from one computer to another computer. Connector
A computer in a network which can provide services to other computer. [SLC 2070] [SLC 2072] [SEE 2074] Server
A main computer in the computer network. [SLC 2068] [SEE 2074 U] Server
The computer that controls and coordinates all the activities of the entire computer in a network. Server
A powerful computer which controls and co-ordinates all computers connected in a network. [SEE 2075] Server
A computer on the network that uses resources of the network. Workstation / Client
The computer on which users run applications. Client
The network models where there is at least one server. Client/Server Network
The network model where each node has equal right. Peer to Peer Network
A type of network in which every computer works as both client and server. Peer to Peer Network
A network model in which resources sharing, processing and communication control are completely decentralized. Peer to Peer Network
A computer network limited within a room. [SLC 2065] LAN
A large computer network that spans a metropolitan area or campus. MAN
A network which is extended beyond the boundary of countries. WAN
The modes of transmission in which communication takes place from both the sides simultaneously. Full Duplex mode
A mode of transmission in which data flows in both directions, but only from one direction at a time. Half Duplex mode
Data communication which is possible in one way only. [U1] Simplex mode
An operating system used in a server computer. NOS
The software which controls and manages all the operation in computer network. NOS
The physical layout or cabling structure of computers on Local area network. [SLC 2069]
[SEE 2074] [SEE 2071 S] [MFT 2076] [MFT 2075] Topology
The arrangement or connection patterns of computers or nodes and other devices of the network. Topology
The topology in which all the computers are connected by a common distribution channel. Bus Topology
A network topology in which network nodes are arranged in a linear format, with each node connected directly to the network cable with a T-connector or tap. Bus topology
Requires less media than other topology. [PMT 2075] Bus Topology
The cabling pattern of computers where all nodes are connected in a closed loop. Ring topology
The cabling pattern of computers where each node is individually connected to centrally located device. Star topology
Hub or switch based network topology. [SLC 2068 S] Star Topology
A set of rules or procedures for transmitting data between electronic devices, such as computer. [SLC 2067] [ SLC 2070 S] Protocol
The rules and regulations to systematize the computer related technology. [SLC 2065 S] Protocol
Rules and format to accept and transfer data in the computer network. [SLC 2066] Protocol
The rules that make the network communication possible. [SLC 2068] [SEE 2073 U] Protocol
Internet and Its Services
Questions and Answers [40]
Internet [SLC 2065 S] [SLC 2066] [SLC 2069] [SLC 2069 S] [SLC 2071 S] [SEE 2074] [MFT 2075]
[PMT 2075K]
Internet is an interconnection of several thousands of computers of different types belonging to the various networks all over the world in order to share data and information.
In other words network of networks is called Internet.
Who controls internet?
Different organization like ISOC (Internet Society), W3C (World Wide Web Consortium), IAB (Internet Architecture Board), IEFT (Internet Engineering Task Force), IRTF (Internet Research Task Force), IESG (Internet Engineering Steering Group) and INIC (Internet Network information Centre) gives directive and guideline for the proper use of internet.
Internet called Network of networks [PMT 2075K]
The internet is called ‘network of networks’ because all the smaller networks of organizations are linked together into the one giant network called the internet.
Protocol used by the internet.
TCP/IP is the communication protocol used by the internet.
Components required for internet connection
A TCP/IP enabled computer with web browser
An account with an ISP
Router / MODEM (necessary if you are using a telephone line to access the Internet)
Connection (ISDN, Satellite, cable and dial-up)
Types of internet connection [SQE 2074K]
i) Dial Up Connection
ii) ADSL Connection
iii) Fiber Connection
ADSL (Asymmetric Digital Subscriber Line) [SQE 2074K]
ADSL is a technology for transmitting digital information at a high bandwidth on existing phone lines to homes and businesses. Unlike regular dialup phone service, ADSL provides continuously-available, "always on" connection.
Services of internet [SLC 2065] [SLC 2068] [SEE 2072] [MFT 2075] [U1]
WWW (World Wide Web)
E-mail (Electronic mail)
FTP (File Transfer Protocol)
IRC (internet Relay Chat)
Newsgroup
Telnet
Internet Telephony
E-commerce
Advantages of internet [SLC 2065 S] [SEE 2075]
Internet has an endless knowledge supply which anyone can access that too free of cost.
Selling and buying has become so easy with the use of internet and it has helped millions to sell and buy their goods online.
Internet has given us E-Mail which is fast, secure and reliable mode of communication.
It makes easy to transfer the file or information.
Disadvantages of internet
Increasing virus threats not only steals your sensitive data but also damages your computer.
People using too much of internet get disconnected from the real world.
Pornography that can get in the hands of young children too easily.
Addiction to online games affects health leading to obesity and serious health issues.
Intranet
An intranet is a private computer network that uses the internet protocol to securely share any part of information of an organization. It is owned by a single organization or company. It can only be used by the employees of the owned organization.
Extranet
An extranet is a computer network that allows controlled access from outside for specific business or educational purposes.
ISP (Internet Service Provider)
An Internet service provider (ISP) is an organization that provides services for accessing and using the Internet. World Link, Mercantile, Classitech, Vianet etc are the ISPs of Nepal.
E-mail (Electronic Mail) [SLC 2068 S] [SLC 2069 S] [SEE 2075 S2] [MM 2076] [MFT 2075]
E-mail (Electronic mail) is one of the most popular services provided by the internet which exchanges messages between the computers through a network. It is the soft copy service of the internet.
E-mail can be sent using a computer with modem, e-mail program and internet facility.
E.g. xyz@gmail.com
Any four sites that provide e-mail services are:
www.yahoomail.com
www.hotmail.com
www.gmail.com
www.outlook.com
Advantages of E-mail [SEE 2067 S] [SLC 2070] [SEE 2073 U] [MM 2076] [MF 2076] [MFT 2075]
It allows to send and receive message across the world at very low cost.
E-mail is faster, cheaper, more reliable than traditional mail.
The image, sound, video and documents can be attached to e-mail message.
Email can be accessed from anywhere in the world.
Disadvantages of e-mail
i) Minor mistakes in e-mail address may deliver the mail to wrong address.
ii) Since it passes through a vast electronic network, it may be seized in between.
E-fax (Electronic Fax)
E-fax is the service of the internet through which a user can send and receive faxes(documents or graphics) directly from a computer to another computer. It is the hard copy service of the internet. E-fax can be sent using a computer with modem, e-fax program and internet facility.
Newsgroup
Newsgroups are discussion groups that focus on a particular topic such as politics, health, computer, etc. The interested people on the particular field write the information or articles. Then these articles are posted to the newsgroup so that other people can read them.
Telnet
A telnet is a program that allows a user to log in to a remote computer on internet as a user on that system.
FTP (File Transfer Protocol) [MFT 2075]
File Transfer Protocol is the internet tool that allows the user to transfer the file from one computer to another computer. It helps to upload and download the files.
Use / Function of FTP [SLC 2071] [SEE 2073]
File Transfer protocol helps to transfer (download or upload) files from one computer to another computer.
Uploading [MF 2076] [MFT 2075]
Ans: Uploading refers to copying files or documents, programs or data from the user computer to the internet server.
Downloading [MF 2076] [MFT 2075]
Downloading refers to the copying files or document or program or data from the internet server to the user computer.
IRC (Internet Relay Chat) [MFT 2075]
Internet Relay Chat is one of the important services provided by the internet which allows the user to communicate with other people in real time.
It uses the browser software without using special chat software. It communicates only text.
For eg: chatting on facebook.
Internet telephony
Internet telephony is one of the cheapest and reliable services provided by the internet that allows the user to make telephone communication or voice communication through internet.
FAQ (Frequently Asked Questions)
FAQ (Frequently Asked Questions) is an online document that possesses series of common questions and answers on a specific topic.
E-commerce (Electronic commerce) [SLC 2069]
E-commerce is one of the popular service of internet which helps in buying and selling of goods over the internet. It is doing business online through the internet.
Any two e-commerce websites are:
https://www.daraz.com.np/
https://muncha.com/
Video conferencing
Video conferencing is an important and interesting service provided by the internet which makes communication using sounds as well as pictures. It requires necessary hardware and software to see and speak to each other.
It enables virtual face-to-face communication among people sitting at different locations.
For eg: chatting on skype.
Online banking
Online banking is the practice of making transaction using the internet.
Webpage
Webpage is an electronic document written using a computer language which contain information about any person ,organization, etc is called HTML.
Website
Website is a collection of web pages that can be published by an organization or individual.
It contains home page and other sub pages.
HTTP (Hyper Text Transfer Protocol)
HTTP is a protocol used by the WWW to establish client and server interactions.
Web browser [SEE 2075 U] [SLC 2067] [MF 2076]
Web browser is a computer program that access web pages and displays them on the user computer.
Examples of web browsers are Mozilla Firefox, Google chrome, Internet Explorer, opera etc. Browsing/ Surfing means searching information on the internet.
URL (Uniform Resource Locator)
Ans: URL is a unique address that provides location of a webpage on the internet.
Example of URL: http://www.abc.com/mainpage/first.html
http: protocol name, www.abc.com: server name, mainpage: path, first.html: filename
Search engine [SEE 2074 U] [SQE 2075K]
Ans: A search engine is a software program or script available through the Internet that searches documents and files for keywords and returns the results of any files containing those keywords. They are used to locate specific sites and information. Examples of search engines are Google, Bing, Yahoo etc
Blog (weblog)
A blog is a time-stamped online journal that appears on a website. A blog is a frequently updated online personal journal or diary. A place to share your thoughts and your passions to the world.
Wi-Fi (Wireless Fidelity)
Wi-Fi is the name of a popular wireless networking technology that uses radio waves to provide wireless high-speed Internet and network connections.
ISDN (Integrated Services Digital Network)
ISDN is a high speed digital communication network involving from existing telephony integrated digital network (IDN) which provides end to end digital connectivity to support a wide range of services including voice and non-voice service.
WWW (World Wide Web)
The World Wide Web (abbreviated WWW or the Web) is an information space where documents and other web resources are identified by Uniform Resource Locators (URLs), interlinked by hypertext links, and can be accessed via the Internet.
DNS (Domain Name System)
Domain Name System is an Internet service that translates domain names into IP addresses.
Social Networking Websites
Social networking websites are online communities in which member interact. Eg. Facebook, Twitter, Instragram etc.
MCQ (Multiple Choice Questions) [40]
The internet was developed by US.
a) Department of Defense b) Department of Electronics c) Department of Commerce d) None
The large group of millions of computers around the world that are all connected to one another.
a) LAN b) Intranet c) Internet d) All of above
Which is not related to Internet? [SLC 2067] [PMT 2075]
a) ISP b) TCP/IP c) WWW d) UPS
Which of the following network connects computer to the Internet? [SLC 2069 S]
a) Intranet b) LAN c) WAN d) MAN
Which device is necessary to operate the internet? [SLC 2066 S]
a) CD-ROM b) ISP c) Modem d) All of above
Connection between a computer and the Internet done using a normal telephone is called
a) Satellite network b) Dial-Up network c) Cable network d) None of them
Which is the protocol used in internet?
a) TCP/IP b) FTP c) ICP d) ISP
__________ is the main line of defense between a local network or intranet and the Internet.
a) USB port b) Encryption key c) Firewall d) Decryption key
Each computer on the Internet has a unique numeric address called a/an …. [SLC 2069 S]
a) Web address b) Domain address c) Network binding d) IP address
The ARPAnet that helped to develop protocol is
a) TCP/IP b) ARP c) POPA d) None of above
Which of the flowing is the internet service? [SLC 2069]
a) IRC b) E-Mail c) Telnet d) All of above
Which is the internet service? [SLC 2064]
a) Telnet b) POP c) Both d) None
Which one is not the service of the Internet?
a) Electronic Fax b) Chatting c) Sharing hardware d) Electronic mail
Which is not an internet service? [SEE 2075]
a) e-commerce b) NIC c) WWW d) e-mail
Which is not an internet service? [SLC 2066 S]
a) e-mail b) e-telephone c) e-fax d) e-commerce
WWW is a [SEE 2073 U]
a) Web browser b) Protocol c) Internet service d) None of above
Email is
Mail concerning electronic devices
Transaction of letters, messages and memos over a communication network.
Transaction of messages within a computer. Iv. None of them.
E-mail is a/an …………… [SLC 2067 S]
a) organization which controls internet b) protocol to access internet c) service of Internet d) none
Which is the correct Email ID? [SLC 2065]
a) Yahoo@ramesh b) Ramesh@yahoo.com
c) @ramesh.yahoo.com d) None of the above
In an email address : abc@yahoo.com, what does ‘yahoo’ refer?
a) User account name b) Domain name c) Top level domain name d) None of them
Which of the following is online business?
a) E-Commerce b) E-shopping c) E-Business d) All of the above
E-commerce is ………….[SLC 2067 S] [SLC 2071 S] [SQE 2074K]
a) a type of business b) a type of virus c) Both d) None of the above
Each web page has its own unique address known as
a) Uniform Resource Locator b) Universal Resource Locator c) Uniform Resources Locator d) Universal Resources Locator
Which of the following allows the user to surf and interact with the web-page?
a) website b) Browser c) web page d) web server
Which is web browser software? [SLC 2067]
a) Windows 2007 b) Internet explorer c) Windows NT d) All of the above
Web sites that allow the users to search information based on keywords or a combination of keywords.
a) World Wide Web b) Electronic mail c) Search engines d) E-Commerce
Which is not the search engine?
a) Yahoo.com b) Google.com c) Bing.com d) Ebay.com
Yahoo! Is a ……..
a) browser b) home page c) search engines d) None
Opera and Firefox is a/an................. [SQE 2075K]
i. chat program ii. Web browser iii. search engine iv. None of the above
FTP is used to
a) Browse the Internet b) Send emails c) transfer files from one computer to another d) None of above
Used to transfer file from one computer to another computer in Internet. [SLC 2070 S]
a) FAQ b) IRC c) FTP d) TPF
i. ii. iii. iv.
Which of the following is remote login service? [SLC 2068 S] [SLC 2071]
a) Video conferencing b) Telnet c) FTP d) TCP/IP
A web site in the internet that brings people together in central location to talk, share ideas, share interests, make new friends.
a) USENET b) Social network c) Web chat d) None
An online interactive communication mechanism that lets people to make a real time decision with one or more people through the Internet.
a) Web chat b) Newsgroup c) Videoconferencing d) E-commerce
The service of the Internet that provides audio and video conversation is_
a) Chat b) . E-mail c) Video conference d) Video chat
The process of transferring file from a remote computer to local computer is:
a) Uploading b) Downloading c) Searching d) File transfer protocol
The process of transferring file from a local computer to internet is:
a) Uploading b) Downloading c) Searching d) File transfer protocol
Web-site is a collection of
a) HTML documents b) Graphics File c) audio and video files d) All of above
A technology that allows the creation of collaborative web sites.
a) Wiki b) E-Mail c) . Search Engine d) All of above
A set of interconnected WebPages, usually including a homepage, generally located on the same server, and prepared and maintained as a collection of information by a person, group, or organization.
a) Web site b) Web Browser c) Web server d) None of above
Fill in the Blanks [30]
Internet is an interconnection of several computers of different types belonging to various network all over the world.
The Internet is network of networks.
The Internet began life in 1969 when the United States Department of Defense started a network called
ARPA net
The internet originated from an experimental network called ARPAnetcreated in 1969.
World Wide Web is also known as internet.
Dial-up internet access requires MODEM and telephone.
A ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬web site is the collection of web pages.
Each page of information is known as web page
Each web sites is identified by the URL.
The main page of the website is called homepage.
Web server are computers that deliver (serves up) Web pages.
Windows Internet Explorer and Netscape Navigator are two popular web browser.
¬¬¬¬¬¬¬¬¬¬¬¬¬Web browser is software that allows the user to surf the information through the Internet.
HTTP is a set of standards that allow users of the World Wide Web to exchange information found on web pages.
The WWW is the leading information-exchange service of the Internet.
Search engine are online services that allow users to scan the contents of the Internet to find Web sites or specific information of interest to them.
On the Internet, a search engine is a coordinated set of programs that receives your search request, compares it to the entries in the index and returns result to you.
E-mail is defined as the exchange of message and computer file between computers over a computer network.
Web chat on the Internet has become a popular way for people to connect online in a group(a chat room) to share similar interests.
IRC is an online textual communication with each other in real time.
The remote login protocol is telnet and file transfer protocol is FTP.
FTP is a protocol used to upload and download information.
E-commerce refers to the buying and selling of things over the Internet.
Broadband can be simply defined as a fast connection to the internet that is always on.
Wi¬-Fi refers to wireless networking technology that allows computer and other devices to communicate over a wireless signal.
Wi-max is a standard for high speed broadband internet access over a wireless connection.
Usenet is a collection of user-submitted notes or messages on various subjects that are posted to servers on a worldwide network.
Video conference is a live video connection between people in separate locations for the purpose of communication or interaction.
Social network is a web site on the Internet that brings people together in a central location to talk, share ideas, share interests, make new friends, etc.
The process of transferring a copy of a file from a remote computer to the requesting computer is called downloading.[SLC 2064]
True / False [50]
The internet allows playing the interactive multimedia games, listening to music and watching digital movies. True
The Internet is a network between different computers within a group. False
Internet is a collection of millions of computers of different types belonging to various networks over the globe. True
The Internet has greatly changed the way people use computers and communicate today. True
The Internet user can only buy goods through the Internet. False
Internet is the service provided by WWW. False
The network of network is called the Internet. [SLC 2065 S] True
The Internet carries large amount of data stored in specific server. True
In the Internet information can be sent from any computer to any other 24 hours a day. True
US government controls the Internet. False
ARPANET was the first computer network. True
The seeds of today’s Internet were planted in 1959, when U.S. Department of Defense sponsored a project named ARPANET. False
The World Wide Web uses a protocol called TCP/IP. False
TCP/IP is responsible for ensuring that the packets are sent to the right destination. True
TCP is responsible for ensuring that the packets are sent to the right destination. False
The web uses HTTP protocol to transmit data. True
A person can reverse the room in a hotel and even purchase goods by using his computer. True
WWW is an organization which controls the internet. [SLC 2073] False
Web documents contain graphics, sounds, text and video. True
FTP is document that allows you to log into another computers on the Internet. False
Usenet messages are stored on central computers. True
The Internet provides facility for posting messages on various subjects on the newsgroup. True
FTP is used to transfer file from one computer to another. True
Communication between all the different devices on the internet is made possible by FTP. False
Downloading is process of sending files from your computer to another computer on the Internet. False
E-commerce is buying and selling products services online. True
Probably the most common web-based resources available through Telnet is library catalogs. True
Telnet allows you to remote computers (called hosts) over a TCP/IP network (such as the internet). True
DNS is used to convert domain name into IP address. True
Websites have their own uniqueness address known as United Resource Locator. False
Chatting only supports voice messages. False
A search engine allows you to search web sites on the net as specified. True
The method of locating information on the internet involves the use of search engine. True
ISP provides the Internet service to end users. True
Google chrome is a search engine. False
Web servers are stored in websites. False
Dial-up connections involves large volumes of information being carried at high speeds to your PC. False
DNS represents a powerful internet technology for converting domain names to IP address. True
Wiki is a technology that allows the creation of collaborative web sites. True
Web server is a set of interconnected web pages. False
Wi-Fi refers to wireless networking technology that allows computers and other devices to communicate over a wireless signal. True
Web chat is a live video connection between people in separate locations for the purpose of communication or interaction. False
People can send or receive email through the IRC. False
You can send only text message through the Internet. False
Social network is a web site on the Internet that brings people together in a central location to talk, share ideas, share interests, make new friends etc. True
You can send mail through internet but cannot receive the mail. False
We will use IRC to make real time communication. True
Electronic mail contains a large collection of linked text , image, sound and video files. False
Fire wall programs allow workgroups to use the internet to see each other’s face in small window on
the computer screen and to hear their voice through speakers. False
A web page can have only textual information. False
Technical Terms [50]
A network of networks. [SLC 2065 S] [SLC 2067 S] [SEE 2071 S] Internet
The largest computer network. Internet
A collection of millions of computers of different types belonging to various networks all over the globe. Internet
The private network within an organization that utilizes the internet services. Intranet
The protocol used for transferring hypertext documents that make the World Wide Web possible. HTTP
A protocol used by the WWW to establish client server interaction. HTTP
A company that provides the Internet facility. [SLC 2067 S] [SLC 2070] [SLC 2072] [SEE 2075 U]ISP
Commercial activities on the Internet. E-commerce
The business conducted through Internet. [SLC 2068] [SEE 2074] [MFT 2075] E-commerce
Buying and selling products and services online. [SLC 2065] [SLC 2071] [SLC 2065 S] [SLC 2069] [MFT 2076] E-commerce
Sending mail by using computer. E-Mail
Online postal service [MM 2076]. E-Mail
The exchange of messages and computer files between computers over a computer network. [SQE 2075K]
E-Mail
A server which sorts and directs your mail for you. Mail server
Protocol used to receive / download e-mail from the mail server. [SLC 2073] [PMT 2075] [MFT 2076]
[MFT 2075] POP
A protocol used for sending emails from one server to another. SMTP
Protocol used to browse the internet. TCP/IP
Both a program and method used to transfer files between computers. FTP
A protocol used for transferring files from one computer to another typically from your computer to a web server.
[MFT 2075] FTP
An internet tool that helps to download /upload the file. [SLC 2067] FTP
A program that allows the user to log into a remote computer on the Internet as a user on that system. Telnet
A service of the Internet that allows a user to access the remote computer. Telnet
A web page, which is designed to search other web pages. Search engine
A coordinated set of programs that receives your search request, compares it to the entries in the index, and returns result to you. Search engine
A searchable database of Internet files collected by a computer program. Search engine
A software which enables to view HTML pages in the Internet [SEE 2073 U]. Web browser
Software that is used for surfing information through the internet. [MFT 2076] Web browser
A global electronic bulletin board system in which millions of computer users exchange information on a vast range of topics. Usenet News
An online meeting and information system that allows people to carry on discussions. Newsgroup
A service of the internet that allows a user to post question for discussion. Newsgroup
Internet programs to communicate with each other by typing in real time.IRC
A service of the Internet that allows a user to send or receive instant message. IRC
An online interactive communication mechanism that lets people to make a real time discussion with one or more people through the internet. IRC
The visual communication of parties around the world. Video Conference
A component of the Internet that presents information in a graphical interface. WWW
The total set of interlinked by hypertext documents residing on HTTP servers. WWW
A collection of internet resources such as files, hyperlinked text, audio, video etc. WWW [SQE 2074K]
The technology with deliver voice over the Internet. Skype
The learning process by using the Internet. [SQE 2074K] E-learning
Learning through electronic media. [SLC 2070 S] E-learning
A mechanism which is used to convert domain names into IP addresses. DNS
The process of sending file from user's computer to web server.[SEE 2075 S2] Upload
The process of copying files, documents, programs, etc from users computer to the web server / internet server. [MM 2076] Upload
The process of transferring a copy of a file from a remote computer to the requesting computer. Download
The document formatting language used to link document in on the web. HTML
A document or resource of information that is suitable for the World Wide Web and can be accessed through a web browser and displayed on a monitor or mobile device. Web Page
The very first page of every web site. Home page
High speed digital communication network evolving from existing telephony. ISDN
The wireless technology that allows computer and other devices communicate over a wireless signal. Wi-Fi
A character (such as asterisk or question mark) that stands for any other character, or series of any character. [SLC 2064] Wild card character
Computer Security
Questions and Answers [20]
Computer security [SLC 2067] [SLC 2069] [SLC 2070 S] [SEE 2073] [SEE 2074 U] [SEE 2075 S2]
The security given to the computer for the protection of hardware, software and data from being lost or damaged due to accidental or intentional harm is known as computer security. The types of computer security are hardware security and software security.
Objectives of computer security
Confidentiality refers to protecting information from being accessed by unauthorized parties. In other words, only the people who are authorized to do so can gain access to sensitive data.
Integrity refers to ensuring the authenticity of information—that information is not altered, and that the source of the information is genuine.
Availability means that information is accessible by authorized users.
Possible threats to computer security [SLC 2069 S]
Human error c) Computer crime e) Natural disasters
War and terrorist activity d) Hardware failure
Hardware security [SLC 2066] [SEE 2066 S] [SLC 2068 S] [SLC 2071 S]
The securing hardware components of the computer system from being damaged or lost due to electrical voltage fluctuation, extreme temperatures, dust, high humidity or mechanical stress is known is hardware security.
Some of the hardware security measures [SLC 2064] [SLC 2065] [SEE 2067 S] [SLC 2070 S] [SLC 2071]
Regular maintenance of computer hardware
Fire detectors
Insurance Policy
Use grille in the windows and use lock in the door to protect from thieves
Use power protection device to protect computer from power fluctuation.
Use vacuum cleaner to clean the room and avoid dust
Protect computer from rain water, moisture and other natural calamities
Software security [SLC 2065 S] [SEE 2066 S]
The security given to the software and data from being lost or damaged due to accidental or intentional harm is called software security. Software prevents the data loss by
Antivirus software can detect and remove virus from the computer.
Scan disk checks folders, bad sector and other error of the disk and fix them.
Software for backup helps in securing the information by keeping backup.
Some of the software security measures [SLC 2065] [SLC 2065 S] [SLC 2068] [SLC 2069] [SLC 2071 S]
keep the backup copy of important data or software
Scandisk
Defragmentation
use Password
use antivirus software and update frequently
use firewall to prevent virus.
Voltage regulator device
A voltage regulator device is an electronic regulator device designed to automatically maintain a constant voltage level.E.g.: UPS, Spike guard, Volt guard, etc.
Power protection device
The device that provides clean AC power to sensitive electrical equipment are called power protection devices. Examples are: UPS, Volt Guard, Spike guard, etc.
Power protection device is needed in a computer system to protect the computer system from damage and expensive data loss.
Importance of power protection device [SEE 2074]
i) To protect the hardware against damage from unexpected power failures.
ii) To protect files and programs being corrupted due to sudden power failure.
Surge Protector
Surge protector is a device that shields computer and other electronic devices from surges in electric power or transient voltage, that flow from the power supply.
UPS (Uninterruptible Power Supply)
A UPS is a device that allows computer to keep running for at least a short time when the primary power source is lost. It provides continuous power supply to the computer system and protects them from power surge and voltage fluctuation.
Importance of UPS [SLC 2070]
The importance of UPS in computer security system is that it controls fluctuation of electric voltage and provides enough backup electric power to the computer system when there is power failure.
Regular Maintenance [SQE 2075K]
Computer system need regular maintenance to keep the computer hardware in good working condition and it also helps to find out problems in hardware and correct the problems before they cause several damages.
Fire detectors
Fireguards and fire extinguisher should be installed to protect computer system from fire. Alarms, security lighting and closed circuit television cameras should be used to protect computer system from theft.
Air Condition [SQE 2074K]
Computer system needs air conditioned room because the factor of climate such as temperature and humidity can pose a threat to computer security. Extremely heat can cause failure of electronic components. Excessive or very low humidity can also have an adverse effect on the computer equipment. This leads to a reduction in the life span of equipment. So, a good air conditioning system is required to eradicate heat-related failures.
Password
A password is a secret word or phrase that gives a user access to a particular program or system. To protect a system from unauthorized access, password should be kept in a system which provides security to the system. A password should be difficult to guess and determine and should be changed regularly and memorized.
Any four criteria for strong password are:
Do not keep a password which can be easily guessed such as date of birth, nickname, etc.
Do not keep word as password that is currently popular.
Keep a password with mixture of alphabet and numbers which is difficult to guess.
Keep changing your password regularly.
How Password secure the data? [SEE 2075]
Password secures the data by protecting the data from unauthorized access.
Password policy
A set of rules designed to enhance computer security by encouraging user to employee strong passwords and use them properly is called password policy.
Backup [SEE 2075 U]
Backup is a copy of a file which is used in the event of the original file being corrupted. Backup is essential to computer security system to recover the important data and programs from accidental and intentional harm. They are stored in different storage devices like hard disk, CDs and pen drives. When the data and software gets lost or damaged the backup system helps to recover the lost or damaged data or software from the backup copy of data and software.
Scan disk
Scan disk is a process which involves in maintaining the disk files and folders, bad sectors, lost clusters, lost chains and other errors of the specific disk and it can fix them if it is possible.
Defragmentation [U1]
The process of re-writing parts of a file to continuous sector on a hard disk to increase the speed of access and retrieval is called defragmentation.
Fragmentation
The scattering of the parts of the same disk file over different location is called fragmentation.
MCQ (Multiple Choice Questions) [30]
The term computer security refers to:
a) Use of antivirus b) Protection of software c) Protection to a computer system d) Use of firewall
Common computer security is
a) Hardware Security b) Software security c) Hardware & software security d) None of them
_______ protect the machine and peripheral hardware from theft, electronic intrusion and damage.
a) Information security b) Hardware security c) Software security d) None of the above
Some of the methods of hardware protection are:
a) Fire Alarms b) Security Lighting c) Closed-circuit cameras d) All of above
Some of the methods of hardware protection are: [SQE 2075K]
a) Password policy b) Security lighting c) Scandisk d) All of the above
Which of the following is not hardware security method?
a) Insurance b) Maintenance c) Closed-circuit cameras d) Hard lock key
Hardware security includes
a) Regular maintenance b) Use of power of regulator devices c) Both d) None of them
Which is not the power protection device?
a) UPS b) Spike Guard c) Volt Guard d) Scan disk
Which of the following is not power supply device?
a) Volt guard b) UPS c) Constant Voltage Transformer d) Power Plug
A device that protects your PC against power surges and spikes.
a) UPS b) Voltage Regulator c) Surge suppressor d) All of the above
An electrical regulator designed to automatically maintain a constant voltage level.
a) UPS b) Voltage regulator c) Surge processor d) All of the above
UPS is a
a) Voltage filtration device b) Voltage processing device c) Voltage regulator device d) None
……….. is a device that allows your computer to keep running for at least a short time when the primary power source is lost.
a) UPS b) Voltage regulator c) Surge processor d) All of the above
To prevent the loss of data during power failures, we use:
a) Encryption program b) Surge protector c) Firewall d) UPS
Which device protects hardware? [SLC 2068]
a) UPS b) MODEM c) Gateway d) All of the above
The temperature in computer system should be maintained between ______to________ [SQE 2075K]
a) 21`C to 24`C b) 20`C to 25`C c) 23`C to 28`C d) None of the above
The temperature in the computer system should be maintained between ………. and ……….
a) 68 to 72 degree Fahrenheit b) 88 to 78 degree Fahrenheit c) 68 to 27 degree Fahrenheit d) All
The type of security that provides barriers and other cyber –tools that protect programs, files and the information flow to and from a computer.
a) Computer security b) Hardware security c) Software security d) None of the above
Which of the following is not software security measure?
a) Virus Scanning b) . Scandisk c) Password d) Security Guard
Data and software security includes
a) Protection from computer virus b) Cover the computer property c) Both d) None of them
_____ is a device that protects your PC from computer virus. [PMT 2075]
i. UPS ii. Voltage regulator iii. NAV iv. None of them
An important counter measure against data corruption or loss. [SQE 2074K]
a) Password policy b) Defragmentation c) Scan disk d) Backup system
Which of the following measure allows to protect computers being opened from unauthorized user?
a) Antivirus program b) Password c) Debug d) program
Scan disk is used for
a) Removing virus b) Removing bad clusters c) Backup data d) All of above
Scan disk is performed by using
a) Application software b) Operating system software c) Utility software d) None
Backup is way of
a) Securing data and information b) Securing internal part of the computer c) Securing external parts of the computer d) None of them
_________ refers to the condition of a disk in which files are divided into pieces scattered around the disk.
a) Fragmentation b) Defragmentation c) Scan disk d) All of the above
Process of arranging the scattered parts of file into a contiguous manner. [SLC 2068 S] [SLC 2071] [SLC 2074]
a) Backup b) Defragmentation c) Debugging d) All of the above
The process of loading the noncontiguous fragments of data, rearranging the fragments and restoring them into fewer fragments or into the whole life.
a) Fragmentation b) Defragmentation c) Scan disk d) None
Defragmentation is a process of
a) Formatting the disk b) Relocation of the disk c) Relocation of the files of the disk d) None of them
Fill in the Blanks [15]
The protection given to the computer hardware and software from being lost or damaged is known as computer security.
Computer security focuses on protecting computers, networks, programs, and data from unintended or unauthorized access, change or destruction.
Computer security is the process of preventing and detecting unauthorized use of any computer.
Hardware security protects the machine and peripheral devices from theft, damage and electronic instruction.
The regular maintenance of hardware keeps the computer devices in good operating condition and helps to find out the problems in hardware.
Voltage regulator an electrical regulator designed to automatically maintain a constant voltage level.
The suitable temperature in the computer room should be maintained between 21 to 24 degree Celsius.
A computer requires a constant source of 110 volt AC power.
The recommended computer room temperature should be 220celcius.
UPS is a battery supported power unit between and external power source and a computer system which supplies clean and continuous power even during power failure.
UPS is a device which provides continuous power and protects the computer equipments from power surges and voltage fluctuations
A power conditioner is an electrical device that provides “clean” AC power to sensitive electrical equipment.
A surge suppressor is an appliance designed to protect electrical devices from voltage spikes.
The tool that is used to maintain performance and error free file management is called scan disk.
A password is a secret series of characters that enables a user to access a file, computer, or program.
True / False [40]
The parts of the computer which can be seen and touched are called hardware. [SLC 2073] True
Computer security is concerned with hardware security only. [SLC 2072] False
The use of ID card prevents unauthorized person from being entered in computer room. True
IP cameras are used for the surveillance and maintenance. True
Lighting cannot cause physical damage to physical system. False
Hardware securing means securing hard disk from being damaged only. False
System maintenance is used to clear viruses from the system. False
The regular maintenance helps to detect problems in computer hardware. True
The routine servicing of hardware is a must to keep equipment tin good operating condition and to find and correct problems before they develop into serious malfunctions. True
Computer equipment should be used and stored at a relative humidity of 5 percent with 50 percent variation. False
Alarms, security lightning and closed-circuit television cameras are some of the methods of software protection. False
Dust, fluctuation of electricity and over heat can damage hardware of computer system. True
A computer requires a constant source of 110-volt AC power. True
The required voltage for computer system is 220 to 240. True
The dust particles can damage hard disk of a computer. True
When a hard disk of a computer system get damaged or lost, we don’t lose any data and information. False
A volt guard supplies back up electric power to the electronic goods when there is load shedding. False
UPS is a device that maintains a constant voltage level. False
UPS protests our computer against voltage fluctuation. [U1] False
Volt guard and stabilizer can supply back up electric power tom a computer system when there is power cut off. False
The electronic device used in the setup of the computer is not delicate. False
Power protection devices protect computer software. False
Air conditioning is more important for the computer system where the temperature and the humidity must be controlled. True
Insurance is one of the computer security measures. True
Security lighting and closed –circuit television cameras are the methods of software protection. False
Loss of information costs more than protecting it. True
Software protection can be made by using physical security. False
Antivirus program are used to protect from unauthorized people. False
Scandisk helps to scan and remove viruses from computer. False
The data and programs stored in a disk cannot be damaged. False
Fragmentation reduces data access time and allows storage to be used more efficiently. False
Defragmentation is the tool that ensures error free file management. False
Backup is used for scanning and protecting computer from viruses. False
The lost data and information can be easily recovered in computer. False
Scandisk is a disk tool that allows checking files, folders, bad sectors, lost clusters, lost chains and any errors of the specific disk. True
Valuable data and information may get lost due to the faulty wiring system. False
The loss of information can cause serious damage to the organization. True
The password prevents unauthorized users to access a file, application or computer system. True
Password protection can be implemented to the computer system only. False
When we set a password to file, and unauthorized person can delete the file. False
Technical Terms [25]
The process of preventing and detecting unauthorized use of your computer. Computer Security
The process of ensuring confidentiality, integrity, and availability of computers, their programs, hardware devices and data. Computer Security
The protection of the components of a computer system. Hardware Security
The securing data and programs from being lost or damaged due to accidental or intentional harm. Software Security
The method applied to increase the life of computers and its assets. Regular Maintenance
A secret word that gives a user access to a particular program and system. [SLC 2064] [SLC 2065 S] [SLC 2069] [SLC 2070 S] Password
A spare copy of important program and documents. [SLC 2069 S] Backup
Making an extra copy of data and software. [SLC 2066] [SLC 2066 S] Backup
Making duplicate copy of file for security purpose. [SLC 2067] Backup
The scattering of the parts of the same disk file over different locations. Fragmentation
The method of consolidating fragmented files on the computer. [SLC 2069 S] Defragmentation
The process of rearranging the fragmented files in the contiguous locations on the disks. Defragmentation
A program that checks a condition of hard disk. Scan Disk
A disk tool which helps to fix errors in the disk and also remove bad sectors. Scan Disk
A television transmitted to the particular audience at specific location via coaxial cables, telephone wires, fiber-optics strands, microwave radio systems, or communications satellites, as compared to open-circuit (broadcast) television intended for the general public. CCTV
The use of video cameras to transmit a signal to a specific place, on a limited set of monitors. CCTV
A device that protects your PC against power surges and spikes. Surge Suppressor
A device or circuit that maintains a load voltage nearly constant over a range of variations of input voltage and load current. Voltage Regulator Device
An electrical regulator designed to automatically maintains a constant voltage level. Voltage Regulator Device
An electrical device that provides “clean” AC power to sensitive electrical equipment. Power Conditioner
A device that protects computer system from the fluctuation of electric voltage. Volt Guard
Device used for power protection. [SLC 2066 S] Volt guard
An electronic device that supply electronic current when electricity is cut off[ SLC 2067 S] [SEE 2073 U]. UPS
The power regulating device this supplies constant power to the computer from its backup system.UPS
A battery supported power unit between and external power source and a computer system which supplies clean and continuous power even during power failures. UPS
Computer Virus
Questions and Answers [15]
Computer virus [SLC 2064] [SLC 2068 S] [SLC 2069] [SEE 2074] [SQE 2074K]
Computer virus is a type of computer program which is written by the programmer with the intent of destroying or damaging the data and programs residing in the computer system. E.g. C-Brain, Frodo, Disk Killer, I Love You etc
The purpose of creating computer virus are:
To stop computer piracy
To entertain user by displaying interesting message and pictures
To destroy data, information and files
To expose the programmers ability
To earn money
Common characteristics of computer virus
Destroy data, information, files or programs of a file.
Steal important data and information.
Load and run unwanted applications.
Display the unnecessary messages or pictures.
Degrade overall performance of the computer system.
Spreading computer virus [SLC 2071]
Sharing infected internal portable disk like floppy disk, pen drive, CDs, etc.
Opening a virus infected email, messages and attached files.
Downloading files and programs form the websites which are not secure.
Exchanging data and information over a network
Symptoms of computer virus [SLC 2067] [SLC 2068] [SLC 2070 S] [SEE 2072] [SEE 2074] [SEE 2074 U]
Program takes long time to load.
Increased use of disk space and growth in file size.
Corrupting the system data.
Renaming files with different names.
Effects of computer virus [MM 2076]
Virus can change the contents of file, and codes of program.
Degrade the overall performance of computer system.
Change in size of file by adding or removing text accordingly.
Preventive ways to protect computer system form virus [SLC 2066] [SEE 2066 S] [SEE 2073] [SEE 2075] [SEE 2075 U] [SQE 2075K] [U1]
Write protect your floppy disks when using them on other computers.
Scan the mail or unknown files of internet before opening in your computers.
Use a good antivirus program to scan floppy disk, CD, etc. before copying.
Don’t install pirated software, especially computer games.
Don’t interchange the internal disk among the computers.
Types of viruses [SLC 2064]
Boot sector virus c) File infector virus e) Multipartite virus
Stealth virus d) Macro virus
Antivirus software [SEE 2073 U] [SLC 2071 S] [SLC 2065] [SLC 2065 S] [SEE 2067 S] [SLC 2069 S]
[PMT 2075K]
Antivirus software is software designed to detect and remove virus from computer system and ensures virus free environment. E.g. Kaspersky, NAV, MSAV, McAfee, NOD 32 etc.
Boot sector virus
Ans: The virus which destroys or infects the boot sector of the disk where master boot record is stored is called boot sector virus. The boot sector virus modifies the Master Boot Record (MBR) that prevents the computer system from being able to boot or start up the computer from system disk. MBR is a small program which is responsible for booting computer system.
Program or file virus
The virus that infects the executable program file having extension .exe, .bin, .sys, .com, etc. is called program virus.
Stealth virus
The virus that infects the program files and boot records which rarely gives the information about its presence is called stealth virus.
Multipartite virus
Ans: The virus which infects both application program and boot sector of a disk is called multipartite virus.
Macro virus
The virus that infects the software document or template created using word processing or spread sheet software is called macro virus.
Computer worm
A Worm is a malicious program that replicates itself and can spread to different computers via Network.
Trojan horse
Trojan horse is a destructive program that disguises as a game or a utility or an application program, which pretends to be something interesting and harmless.
MCQ (Multiple Choice Questions) [30]
Computer virus is___________software.
i. Malware ii. Utility iii. Application iv. Operating System
Computer virus is ………. [SLC 2068 S]
i) dust particle ii) computer programs iii) useful program iv) none of the above
Virus is a [SLC 2071]
i. Utility program ii. Destructive program iii. System program iv. None
Computer virus can
i. Hide in a host file ii. Replicate iii. Spread iv. All of the above.
Computer virus can destroy
i. Hardware ii. Software iii. Data iv. All
Which one of the following is harmed by computer virus? [SEE 2074 U]
(i) Monitor (ii) Mouse (iii) Printer (iv) Hard Disk
Which is not a virus? [SLC 2064]
i. Worm ii. Logic bomb iii. Trojan Horse iv. Win-zip
Which one is not a type of virus? [SLC 2067 S] [SLC 2070] [SLC 2071 S] [SQE 2074K]
i) Message Carrying virus ii) Boot sector virus iii)System virus iv)Special Purpose Application Infector
Route of virus transmission. [SLC 2065] [PMT 2075]
a) Mouse b) Printer c) Microphone d) Pen drive/Flash drive
Computer virus can spread from one computer to another through_
i. Infected portable disk ii. The Internet iii. Pirated software iv. All of the above.
A program or set of programs designed to prevent, search for, detect, and remove software viruses, and other malicious software like worms, Trojans, adware and more.
i)Shareware ii)Freeware iii)Antivirus
Which is not a computer virus ? [SEE 2075]
(i) kaspersky (ii) message carrying virus (iii) Boot sector virus (iv) Program virus
Which of the following is not anti-virus
i.AVG ii.NAV iii. Kaspersky iv. I Love you
Which of the following is an anti-virus program? [SLC 2068 S]
i) NAV ii) Windows iii) Photoshop iv) All of the above
An example of antivirus software is
i. NAV ii. McAfee iii. CPAV iv. All
Which is antivirus software?
i. Scan ii. Defrag iii. Kaspersky iv. Power point
A program that is used to detect and remove virus. [SEE 2075 U]
i) C- Brain ii) Worm iii) Trojan Horse iv) Kaspersky
Norton antivirus, when loaded onto a computer system , checks the following areas for viruses
a) boot record b) programs at the time you use them c) both
________ Virus are often transmitted by a floppy disk left in the floppy disk drive.
a) Boot-sector Trojan horse Script logic bomb
Which computer virus damages the master boot record? [SLC 2068]
i) Macro virus ii) File virus iii) New folder virus iv) Boot sector virus
Which virus infects boot sector files? [SLC 2069]
i) Macro virus ii) Multipartite virus iii) Boot sector virus iv) Program virus
Boot sector virus infects [SLC 2066]
i. System files ii. Master boot record iii. Application software iv. Document file
Disk Killer, stoned and Michelangelo are examples of ________________
i) Boot sector virus ii) File infecting virus
iii) Polymorphic virus iv) All of the above
A virus that infects the part of the computer called a system sector.
i. Boot sector virus ii. File infecting Virus iii. Polymorphic virus iv. None of the above
Which of the following virus infects the various parts of operating system?
i. boot sector ii. Worm iii. Macro iv. system infector
A type of virus that infects executable files having .exe, .com, .ovl, .drv, .sys, or .dil.
i) Boot sector virus ii) File infecting iii) Script virus iv) Macro virus
__________ Virus can infect both programs and boot sectors.
a) Stealth virus b) File infectors c) Multipartite virus d) Polymorphic virus
Multipartite viruses have combination features of
i. Boot sector & stealth virus ii. Boot sector ¯o virus
iii. Boot sector & program virus iv. None
Viruses attach themselves to documents such as Word and Excel.
a) Macro virus b) File infectors c) Polymorphic virus
__________ is a self-encrypted virus designed to avoid detection by a scanner.
i. Polymorphic virus ii. Macro virus iii. Script virus iv. None of the above
Fill in the Blanks [20]
The first person who introduced the concept of replicating program was John von nevmann.
Computer virus Is a program that spreads by first infecting files or the system areas of a computer or network router’s hard drive and then making copies of itself.
Computer virus is a program that can copy itself and infect a computer without the permission or knowledge of the user.
Computer virus is a program containing code that can generate multiple copies of itself .
The capability of generating the copies of itself is called replication.
Antivirus software is a class of program that searches your hard drive and floppy disks for any known or potential viruses.
Antivirus are used to detect and remove computer virus from infected file or memory. [SLC 2064]
Message carrying viruses usually do not destruct the computer files/programs but display interesting information to entertain the users.
Firewall are software programs or hardware devices designed to keep computers safe from hackers.
A MBR is an area of the computer hard drive or a floppy disk that is executed when the computer is started.
Boot sector virus infects or substitutes its own code for either the DOS boot sector or the master boot record(MBR)
File infector viruses infect executable program files having an extension .exe,.com,or.dll.
File infector virus affect executable file.
A macro virus is a type of computer virus that infects the word processing or spread sheet document or template.
A malicious program that pretends to be something useful program is known as trojan horse.
A program that is not a virus but behave like virus and can replicate is known as worm.
Multipartite viruses can infect both the application programs and the boot sector of a disk.
Polymorphic code is a code that mutates while keeping the original algorithm intact.
A polymorphic virus is a complicated computer virus that affects data types and functions.
Polymorphic viruses are very difficult to identify and detect by anti-virus.
True / False [30]
A computer virus can cause actual damage or destruction to the hardware components of a computer system. True
Virus spreads across disks and networks by making copies of it. True
Computer viruses used to be a developed unknowingly while developing computer program. False
Viruses are easily identified as other programs. False
Viruses mostly spread through computer network. False
Viruses change the size of file and memory. True
Computer virus deletes unnecessary data, information and programs of a computer. False
Computer virus is visible like other files and programs. False
Computer viruses are created to stop the software piracy. True
Computer viruses hide themselves in host files. True
Computer virus decreases the space in the main memory and increase the size of the executable files. True
A computer virus needs another program in order to be able to be activated and infect other computer files. False
Each computer virus contains instructions to initiate a unique, problematic event on the infected computer. True
Computer viruses cannot delete files and format a user’s hard disk. False
Pirated software copies viruses, to the computer. True
Do not install pirated software, especially computer games. True
Viruses can easily hide within a system by attaching themselves to other files or program because they are small in size. True
System infectors usually enter to the system as a device driver and get loaded into memory. [SLC 2064]. True
Script viruses attach themselves to any executable file, usually .COM, .BIN, EXE etc. False
A macro virus infects both the application program and the boot sector of disk. True
Macro viruses infect files created in Microsoft application software like MS-Word, MS-Excel, etc. True
A virus that can change its appearance with every infection is called macro virus. False
Stealth virus is a file virus that uses special technique to hide its presence from user and virus scanners. True
Stealth virus is a computer virus that uses various mechanisms to avoid detection by antivirus software. True
A files infecting virus activated only when you turn or a restart your computer. False
A macro virus is a computer virus that replaces a macro, which is what enables a program to work and instigates a designated group of action and commands. True
An anti-virus program having old virus definition file can effectively detect the latest virus. True
Antivirus software must perform algorithms scanning to detect script virus. True
Multi-partite virus can infect both the boot sector of the disk and executable file. True
Boot sector virus infects the program files. [SEE 2075 S2] False
Technical Terms [20]
A software program with the ability to generate multiple copies itself. Computer Virus
A program that destroys other program. [SLC 2065] Computer Virus
A computer program that entertains and damages the user’s file. Computer Virus
A program that effect the normal functioning of computer. [SLC 2068] Computer Virus
The software that protects computer virus.[SLC 2069]. Antivirus
A program that can disinfect a file from virus. [SLC 2070] [SLC 2072]. Antivirus
Program used to detect and eliminate computer virus. [SLC 2066 S] [SQE 2075K] Antivirus
A virus that infects the part of the computer called a system sector. Boot Sector Virus
A virus infects or substitutes its own code for either the DOS boot sector or the master boot record (MBR) Boot Sector Virus
A small program that runs every time the computer starts up. MBR
A type of virus that infects executable files having .exe, .com, .ovl, .drv, .sys, or .dil. File Infector Virus
A virus that affects application programs. File Infector Virus / Program Virus
A virus that corrupts system files of operating system. [SLC 2066] System Infector Virus
A virus that shows different behavior in each infection. Polymorphic Virus
A complicated virus that affects data types and functions. It is a self encrypted virus designed to avoid detection by a scanner. Polymorphic Virus
A code that mutates while keeping the original algorithm intact. Polymorphic Virus
A series of commands and actions that help to automate some task. Macro Virus
A computer virus that damages the documents created in MS-Word & MS-Excel. [SLC 2068 S] [PMT 2075] Macro Virus
A virus that infects both boot sector of a disk and program files. Multipartite Virus
A file virus that uses special technique to hide its presence from users and virus scanners. Stealth Virus
Multimedia
Questions and Answers [15]
Multimedia [SLC 2064] [SLC 2065 S] [SEE 2067 S] [SLC 2070 S] [SEE 2073] [SEE 2073 U] [SEE 2075]
Multimedia is the integration of multiple forms of media, which presents information in more interesting and understandable way.
Multimedia technology is becoming popular because it shares the ideas, views and thoughts of people in an interactive, effective and understandable way.
The five types of media used in multimedia technology are:
i) Text ii) Audio iii) Video iv) Graphics v) Animation
Application areas of multimedia technology [SLC 2064] [SLC 2065 S] [SEE 2067 S] [SLC 2070 S]
[SEE 2073 U]
The application areas of multimedia technology are Communication, Entertainment, Medicine, Education, Video games, Advertisement, Presentation, Films, Public accessing, Learning foreign language, etc.
Advantages of multimedia technology [SLC 2067] [SLC 2069 S] [SEE 2072] [PMT 2075K]
Multimedia enhances standard education techniques and makes learning process easier.
It makes easy to share views, ideas and thoughts among various people.
The use of multimedia can enhance every area in a presentation.
It makes presentation of related subject matter attractive.
Information combined with multimedia will be easy to understand and convincing.
Disadvantages of multimedia technology [SEE 2072]
The cost of developing a multimedia product is high.
An ordinary computer cannot play multimedia.
Skilled manpower is required to operate multimedia.
Computer needs extra hardware like CD-Drive, head phone, sound box, etc, which adds expense.
Hardware components required for multimedia
i) Sound Card ii) Speaker iii) Headphones iv) CD/DVD ROM drive v) Graphics Card
Software packages used for multimedia technology [SLC 2066]
i) Adobe Photoshop ii) Macromedia flash player iii) Animator Pro iv) 3D studio MAX
v) Maya vi) Coral Draw etc.
Animation
Animation is a simulation of movement created by displaying a series of pictures or frame.
The moving graphic images is called animation.
For example: Cartoons
Video
Video presents the moving images of the real events.
For example: Movies.
Virtual reality
Virtual reality is an artificial environment created by computer hardware and software and presented to the user in such a way that it appears real.
Multimedia computer system [SQE 2074K]
A multimedia computer is a computer equipped with special hardware and software that makes multimedia possible. The components of multimedia computer are:
i) Faster CPU ii) Larger storage device iii) Large main memory
iv) High resolution monitor v) Sound card and speaker vi) Keyboard and pointing device
Multimedia in education [ [SEE 2066 S] SLC 2068] [SLC 2068 S] [MM 2076]
The role of multimedia in education is that it makes teaching / learning easier in classroom as well as it makes presentation of related subject matter attractive.
Edutainment
A form of education which is designed to be entertaining in order to keep people interested and engaged is called edutainment.
Multimedia in advertisement [SQE 2075K]
The role of multimedia in advertisement is to to promote any items and approach new user to use it perfectly.
Hyper media
An extension of hypertext that supports linking graphics, sound and video elements in addition to text elements is called hypermedia.
Multimedia in entertainment
Multimedia is useful in entertainment to develop special effects in movies and animation and also to develop multimedia games.
Multimedia useful in industrial sector
Multimedia is used in business to present information to share holders, superior and co-workers. It is also used for various purposes such as employee training , sales presentation, products, advertisement, consumer education, etc.
Multimedia in presentation software
Multimedia presentation software is a tool that computer users of varying industries and backgrounds use to dynamically present information to an audience.
MCQ (Multiple Choice Questions) [30]
A computer-derived electronic system that allows the user to control, combine, and manipulate different types different types of media, such as text, sound, video, computer graphics and animation.
Monomedia Multimedia Hypermedia None of the above
Which of the following media are used in Multimedia system?
i. Text-audio ii. Text-visual iii. Text, graphic, audio and visual iv. Text, graphic and sound
The types of media used in multimedia includes
Text Graphics Sound All of them
A MUK consists of the
CD-ROM Drive Sound Card Speaker All of them
Which of the following are components of multimedia?
i. Computer ii. Software iii. Projector iv. All of above
Which of the following is main component of multimedia? [SLC 2065] [SQE 2075K]
i. Floppy disk ii. Floppy drive iii. Sound card iv. Magnetic tape
Which of the following is the main component of Multimedia system? [SEE 2074 U]
(i) Keyboard (ii) Windows (iii) Sound Card (iv) Printer
Which of the following is the component of multimedia? [SLC 2069 S]
i) Network ii) Microphone iii) Power cable iv) Printer
Select the common components of the multimedia computer system.
Floppy Floppy drive CD-ROM None
Which is not related to multimedia? [SLC 2069]
i) Printer ii) Sound card iii) Microphone iv) CD-ROM
Which of the following is an audio output device? [SLC 2070]
i) Microphone ii) Speaker iii) Monitor iv) Printer
Which of the following is an audio input device? [SLC 2071]
i. Printer ii. Microphone iii. Head phone iv. Speaker
Which of these software is used for photo editing? [SLC 2074]
(i) Ms-Excel (ii) Photoshop (iii) Power-Point (iv) Ms-Word
Which one is the software used in multimedia?
CD-ROM Sound Card Sound Forge MS-Word
Software used in multimedia system. [SEE 2075 U]
a) Animator b) Flash Player c) Power Point d) All of them
Which is the multimedia software ? [MM 2076]
i) Photoshop ii) MS Power point iii) VLC Player iv) All of them
The software associated with the multimedia technology is .
i. Macromedia Flash ii. Microsoft Word. iii. Adobe In design iv. None of the above
Software associated with the multimedia technology is
Windows XP Macromedia Flash QBASIC None
Which of the following is software used in multimedia technology.
i. Office XP ii. Adobe Photoshop iii. Basic iv. None of the above
Which of the following is not multimedia software?
i. Windows media player ii. Windows XP iii. Adobe illustrator iv. Macromedia flash
Which of the following is multimedia application?
i. Education ii. Entertainment iii. virtual reality iv. All of above
Multimedia technology is very effective in
Market Classroom War None
Multimedia technology is used in ……… [SLC 2066]
i) Education ii) Business iii) Health care iv) All of the above
An artificial reality that projects the user into a 3D space generated by the computer.
Virtual Reality Virtual Computer All of the above None of the above
An upcoming technology that makes users feel in Virtual Environment(VE) by using computer hardware and software.
i)Virtual space ii)Virtual computer iii)Virtual reality iv)None of above
_____ deals with the recording and display sequence of images at a reasonable speed to create an impression of movement.
Graphics Video Animation Text
Graphics that contain movement often referred to as .
i. Graphics ii. Video iii. Animation iv. Text
_______ provides a visual impact.
Image Graphics Video None of them
The process of displaying still images in a rapid sequence to create the illusion of movement.
i)Text ii)Graphics iii)Video iv)Animation
An extension to hypertext supports linking graphics, sound and video elements in addition to text elements.
Interactive media Hypermedia All of the above None of the above
Fill in the Blanks [20]
A computer capable of handling texts, graphics, audios, animations and videos is called multimedia computer.
Multimedia is a computer-delivered electronic system that allows the user to control, combine and manipulate different types of media such as sound, video, computer graphics and animation.
Multimedia is the integration of multiple forms of media.
Multiple media in one content is called multimedia .
Multimedia enhances the information for better communication and understanding.
Graphics provides a visual impact.
Graphics is a digital representation of non-text information such as a drawing, chart or photographs.
Graphics deal with the generations, representations, manipulation and display of pictures with the aid of computer.
Animation represents multiple picture in a sequence.
Video is the process of displaying still images in a rapid sequence to create the illusion of movement.
Video deal with recording and displaying of a sequence of mages at a reasonable speed to create an impression of movement.
Video refers to pictures in motion.
Text is the primary component of multimedia.
Optical disk is used to store data and information in the multimedia technology.
Hoarding board is an example to use multimedia in commercial field.
Multimedia is used in the entertainment industry, especially to develop special effects in movies and animation.
Virtual Reality is an artificial environment created with computer hardware and software and presented to the user in such a way that it appears.
A simulated 3-D environment is called Virtual Reality.
Virtual Reality is the use of computer modeling and simulation to enable a person to interact with an artificial three-dimensional visual or other sensory environment.
Virtual reality uses head sets and data gloves.
True / False [35]
Multimedia is used only in the field of information technology. False
Multimedia presentation is less effective than lecturing. False
Multimedia manipulates the information for better communication. True
Multimedia helps to develop creative ideas. True
Multimedia products take much time to develop and are expensive. True
Multimedia computer can play more than one medium simultaneously. True
Multimedia is used in business to promote business. True
Multimedia products are stored in pen drive. False
Multimedia is used in movies to add special effects. True
Multimedia manipulates the information for better communication. True
Multimedia technology used in public places as an information provider. True
Multimedia provides a medium to promote, sell, teach and communicate in new interactive ways. True
Multimedia uses more than one media. True
Multimedia does not include animation. [SLC 2064] [SLC 2065 S] False
All the multimedia products are available in optical disks. True
A computer that can handle only text and audio is multimedia computer. False
Microphone is essential in multimedia. [U1] True
Sound card is one of the hardware required in multimedia computer. [SLC 2072] True
Sound card is one of the components of multimedia.[SEE 2075 S2] True
Sound cards capture movies, or pictures from external device. [SLC 2064] False
Keyboard and mouse are two important components for any multimedia computers. True
All the computers are capable of handling multimedia. False
A picture is a worth of thousand words. True
Virtual reality is a simulated process to represent real world scenario. False
Virtual Reality is an artificial reality that projects the user into 3D space generated by the computer. True
Tutorial CD and TOEFL CD are interactive multimedia CDs. True
Video increase the retention of information for long time in the memory of people. True
The important elements of multimedia are text, graphics, video, animation and audio. True
Animation is a digital representation of non-text information, such as a drawing, charts or photographs. False
Animation deals with synthesizing, recording and playback of audio or sound with the aid of computer. False
Animation refers to simulation of movement created by displaying a series of picture one after another. True
Cartoon movies are examples of animation. True
Most of the information is conveyed through the text medium. True
Images do not play any role in multimedia. False
Graphics is a series of image that are displayed in rapid succession giving, the illusion of movement. False
Technical Terms [20]
A computer system that is capable of handling more than one medium simultaneously. Multimedia Computer System
The integration of text, audio, sound and animation. [SLC 2067] [SLC 2069 S] [SLC 2071] [SEE 2074 U] [SEE 2075 S2]. Multimedia
The combination of more than media such as text, picture, sound, movies clips, etc. Multimedia
A technology that will enhance multimedia by supporting real time, interactive, three-dimensional graphics. [PMT 2075] Virtual Reality
An upcoming technology that makes user feels in a Virtual Environment (VE) by using computer hardware and software. Virtual Reality
The artificial environment created by computer technology to entertain users [MM 2076]. Virtual Reality
Learning through the electronic media. [SEE 2074 U] e-learning
An emerging term, multimedia used in education. Edutainment
A technology that makes teaching-learning easier in a classroom. Computer Aided Learning (CAL)
A form of education which is designed to be entertaining, in order to keep people interested and engaged. Edutainment
The technique used to provide medical information and services through the internet. [SQE 2075K] E- medicine
The process of displaying still images in rapid sequence to create the illusion of movement. Animation
A simulation of movement created by displaying a series of images of artwork one after the other. Animation
The moving graphic images. [SEE 2073] [SEE 2075 U]. Animation
The real images of artwork. Animation
The process of giving the illusion of movement to drawings, models or inanimate objects. Animation
The creation and manipulation of picture images in the computer. Graphics
The display of still-frame pictures or photos on a computer screen. Graphics
An extension to hypertext that supports linking graphics, sound and video elements in addition to text elements. Hypermedia
The process of displaying alphanumeric characters on the screen to present information. Text
Cyber Law And Ethics
Questions and Answers [15]
Cyber law [SEE 2075 S2] [PMT 2075K]
The law which governs the legal issues in the cyber space regarding the internet or WWW for digital data processing and transaction is called cyber law. The importance of cyber law is that it controls cyber-crime and misuse of computer.
Importance of Cyber Law [PMT 2075K]
Cyber law is important because it touches almost all aspects of transactions and activities on and concerning the Internet, the World Wide Web and Cyberspace.
Requirement of Cyber law in Nepal
Cyber law is needed to legalize the transaction through electronic media to control various types of electronic frauds and to punish a person who does criminal activities through electronic means especially on computers.
Aims of formulating cyber law in Nepal [SLC 2070]
i) To legalize the transaction through electronic media to control various types of electronic frauds
ii) To punish a person who does criminal activities through electronic means especially on computers.
Cyber space
A virtual space created by computer network, internet and telecommunication is called cyber space.
Major laws included in cyber law
Electronic and Digital Signature law
Computer crimes/Cyber-crime law
Intellectual property law
Data protection and privacy law
Telecommunication law
Five major aspects of cyber law of Nepal 2004
Provides legal status for various banking transaction through electronic media, which will be instrumental in boosting economic activities throughout the world via internet.
Provides a legal framework to facilitate and safeguard electronic transactions in electronic medium.
Provides detailed provisions for the controller of certifying authorities to regulate certifying authorities.
Provides punishment who conducts cyber crime.
Provisions under the act in order to control and regulate the criminal activities apparent in Nepal cyber environment.
Major issues address by cyber law
Criminal activities on cyberspace.
Electronic commerce, online transactions and digital signature.
Intellectual property right, copyright violation
The provision of e-governance by promoting electronic recording system
Cyber crime [SEE 2074] [SLC 2071]
Cyber crime is an illegal action involved in any computer, computer system or over all computer networks like internet. E.g. Software piracy, hacking, cracking, pornography etc.
Computer hacking means stealing and destroying other data, information, files and program.
Digital signature
Digital signature is a security mechanism system used on the internet for data and information transaction by attaching a code at the end of the electronic message that attests the authenticity of sent message. The importance of digital signature is that it provides legal framework to facilitate and safeguard electronic transaction in the electronic media.
Encryption
The process of encoding (scrambling) information in such a way that it is unreadable to all is encryption.
Decryption
The process of restoring encrypted data to its original form is decryption.
Computer ethics [SEE 2075 U] [SLC 2065] [SLC 2069] [U1]
Computer ethics refers to follow the rules and regulation of computer technology and not to harm other computer users knowingly or unknowingly.
Some commandments of computer ethics.
Not to use computer to harm other people.
Not to search the files or records of other people.
Not to destroy, steal and use others computer passwords.
Not to destroy, erase or edit personal or group records.
Not to use computer to steal.
Intellectual property rights
The legal property rights of someone over his creations of the mind both artistic and commercial are called intellectual property rights.
Data security and privacy law
Data protection and privacy refers to the process of ensuring the preservation, integrity and reliability of data. The law related to it is called data security and privacy law.
Freedom of information act
The purpose of freedom of information act of 1970 is to promote maximum disclosure of information in the public interest, to guarantee the right of everyone to access information and to provide for effective mechanism to secure that right.
Video privacy protection act
The purpose of video privacy protection act of 1988 is to limit the disclosure of personally identifiable information regarding video rentals.
MCQ (Multiple Choice Questions)[20]
A genetic term that is concerned to the legal and regulatory aspects of Internet and computer technology.
Copyright law Cyber law Computer Crime None of them
“The Electronic Transaction and Digital Signature Act-Ordinance” is Known as:
Intellectual Property Law Cyber Law
Telecommunication Law Data Protection Law
When did cyber law introduced in Nepal? [SEE 2075 U]
i.2002 A.D. ii.2003 A.D. iii.2004 A.D. iv.2005 A.D.
When did cyber law introduced in Nepal? [SLC 2066] [SLC 2070 S]
i) 2061 B.S. ii) 2062 B.S. iii) 2007 B.S. iv) 2016 B.S.
The government of Nepal has passed the cyber law on:
31st Bhadra 2061 BS 29th Bhadra 2061 BS 30thBhadra 2062 BS 30thBhadra 2061 BS
The term ‘cyberspace’ was used in:
1884 1985 1885
A criminal activity within the information technology infrastructure.
Digital crime Intellectual property Cybercrime All of them
Which of the following is computer crime?
i. piracy ii. pornography iii. harassment iv.All of above
Which of the following is not computer crime?
i. Plagiarism ii. Password guessing iii. Internet iv. virus transferring
_______ is the normal Principal that regulates the use of computers.
Cyber Law Cyber act Computer ethics All of them
Which of the following is not computer ethics?
Not to steal data Not to bear false message Not to use Internet Not to harm the society
Premeditated, usually politically-motivated violence committed against civilians through the use of, or with the help of, computer technology
i) Cyber stalking ii) Cyber laundering iii) Cyber theft iv) Cyber terrorism
The act of attempting to acquire sensitive information like usernames, passwords and credit card details by disguising as a trust worthy source.
i) Hacking ii) Phishing iii) Computer Virus iv) Cyber stalking
Electronic transfer of illegally-obtained monies with the goal of hiding its source and possibly its destination.
i)Cyber stalking ii) Cyber laundering iii) Cyber theft iv) Cyber terrorism
The method of making the data or message unreadable by unauthorized people.
Digital signature Decryption Encryption All of them
Which of the following is included in cyber law?
i. Trademark right ii. Copyright iii. Data privacy iv. All of the above
The law which includes literature and art, films, computer programs, invention, designed used by traders for their goods or services is called:
Data Privacy Law Intellectual Property Law
Telecommunication Law Cyber crime Law
The Process of ensuring the preservation, integrity and reliability of data is Known as:
Intellectual Property Law Data Protection and Privacy law
Cyber Law Telecommunication Law
The law that provides a legal framework to facilitate and safeguard electronic transaction in the electronic medium.
i. Digital signature law ii. Intellectual property law ii. Telecommunication law
A federal law enacted in 1970 to ensure confidentiality of consumer credit information held by lenders and credit reporting agencies.
i. Fair credit reporting act ii.Federal privacy act iii.Copyright act
Fill in the Blanks [20]
Telecommunication is the exchange of information over significant distances by electronic means.
Cyber law includes a wide variety of legal issues to the use of communication technology.
Cyber law is a generic term, which refers to all the legal and regulatory aspects of internet and the world wide web
Cyber law is the law governing computers and the Internet.
Cyber law of Nepal commonly known as the Electronic Transaction And Digital Signature Act-Ordinance was enacted in Nepal in 2061 B.S. [SLC 2064]
Cyber crime may include thefts or actions in electric form that causes damages or difficulty to other computer users.
Cyber crime is a criminal activity done using computers and the Internet.
Cyber Crime refers to illegal activities involved in any computer.
The activity of breaking into a computer system to gain an unauthorized access is known as . hacking.
The use of communication technology, mainly the Internet to torture other individuals is known as cyber stalking.
Computer ethics is the set of moral principles that regulate the use of computers.
Cyber space does not only include the internet and computers, but it present where two or more cables or wires etc meet.
Cyberspace has become synonyms with the internet.
A digital signature is an electronic signature that can be used to authenticate the identity of the sender of a message or the signer of the document, and possibly to ensure that the original content of the message or document that has been sent is unchanged.
Digital Signature is a security Mechanism system in the cyberspace for digital data processing and transaction.
Intellectual property law is a term referring legal property rights of someone over his creations of the mind , both artistic and commercial.
The law which is enacted to ensure the preservation, integrity and reliability of data is called data protection and privacy law.
Fair credit reporting act is a federal law enacted in 1970 to insure confidentiality of consumer credit information held by lenders and credit reporting agencies.
Video privacy protection act limits the disclosure of personally identifiable information regarding video rentals.
US introduced fair credit reporting act in 1970 A.D.
True / False [35]
The term ‘cyberspace’ was used by William Gibson in 1984 for the first time. True
The cyberspace describes the real world of computer. False
Cyber law does not deal with issues relating to telecommunications. False
Some common issues of cyber ethics are intellectual property right, privacy concerns and how computer affect society. True
The cyber law of Nepal has the provision of appellate judicial body to issue licenses of certification to the IT industry monitor implementation of the act and regulate ICT activities. True
Cyber law is the set of moral principles that govern the behavior of a group or individual.
Cyber law is legal and regulatory framework in cyber space. False
Cyber law covers those areas including ICTS. True
Cyber law of Nepal commonly known as the Electronic and Digital Transaction Act-Ordinance was enacted in Nepal in 2061 B.S. True
“The Electronic Transaction and Digital Signature Act-Ordinance” is popularly known as “cyber law” of Nepal. True
The government of Nepal could not pass “The Electronic Transaction and Digital Signature Act-Ordinance”. False
Moral principles that regulate the use of computers are also explained in cyber law. False
Cyber ethics are moral principles that make aware to the computer users. [SLC 2064] [SLC 2065 S] True
Computers ethics refer the behavior and ways of thinking of computer users in situations where a choice can affect the dignity and wellbeing of others. True
The copyright law makes it legal to produce extra copies of software for sale. False
Copy right law is one of the laws of cyber law. [U1] True
Copyright law is related to intellectual property law. True
Copyright includes inventions (patents), trademarks industrial designs and geographic indications of source. False
Copyright Act of 1992 provides access right to government to see any record of individual. False
The copyright act of 1992 imposed on entirely new body of requirements on the federal government handling of information concerning individuals. False
Data protection law provides a legal framework to facilitate and safeguard electronic transaction in the electronic medium. False
Intellectual Property can be defined as the relationship between collection and dissemination of data, technology privacy, and the legal and political issues surrounding them. False
Intellectual property describes a wide variety of property created by musicians ,authors , artist, and inventors. True
Fair credit reporting act is a federal law enacted in 1970 to ensure confidentiality of consumer credit information held by lenders and credit reporting agencies. True
Two possible reasons for cyber-crime are problems with moral vision and rationalization of the problem. True
Internet pornography is a type of cyber-crime. True
Cybercrime is a criminal activity involving the information technology infrastructure. True
Cybercrime refers any illegal act that involves a computer. True
Cybercrime is defined as any type of illegal activity that makes use of the internet, a private or public network, or an in-house computer system. True
The digital signature allows the user to attach an original signature on the document of electronic records. False
Digital signature law provides a legal framework to facilitate and safeguard electronic transaction in the electronic medium. True
The digital signature is simply a small block of data that is attached to documents you sign. True
Freedom of the information Act is a federal law passed by Congress in 1966 and became effective on 4 July 1967. True
Computers today are being misused for illegal activities like e-mail espionage, credit card fraud, spams, and software piracy and so on, which invade our privacy and offend our senses. True
Information Technology (IT) provides a new shape to build a dynamic world. True
Cyber laundering is the transferring illegal items through the internet (such as encryption technology) that is banned in some locations. False
Technical Terms [20]
The law that governs the legal issue of cyberspace. [SLC 2064] [SLC 2065] [SLC 2069 S] Cyber Law
The rules and regulation to systematize the computer related technology. [SLC 2065 S] Cyber Law
The law that controls cyber crimes (fraud, hacking). [SEE 2073] [SEE 2074] [SEE 2074 U] [SEE 2075 U]. Cyber Law
The moral principles that control cyber-crime. [SLC 2068 S] [SLC 2071] [SEE 2071 S]. Computer Ethics
Moral rules to be followed by computer and other professionals.[SLC 2066] Computer ethics
A person who steals the password or credit card number of Internet users and make unauthorized access of it. [SLC 2070] [SLC 2072]. Hacker
The activity of breaking into a computer system to gain an unauthorized access. Hacking
A computer user who attempts to break into copyright protected software or an information system. Cracker
Illegal activities committed through the use of computer and Internet. [SEE 2075] Cyber Crime
Committing crime using computer and Internet. [SEE 2075 S2] Cyber Crime
An electronic equivalent of a signature. Digital Signature
A mathematical scheme for demonstrating the authenticity of a digital message or document. Digital Signature
A security mechanism used on the internet that relies on two keys, one public and one private. Digital Signature
The rights granted to creator and owners of the works that are the result of the human intellectual creativity. Intellectual Property Law
Law that prevents illegal copying. Copyright Law
Software that do not come from reliable sources. Pirated Software
The unauthorized duplication and use of computer software. Software Piracy
Transferring illegal item through the internet (such as encryption technology) that is banned in some locations. Cyber Contraband
The electronic transfer of monies with the goal of hiding its source and possibility its destination. [SQE 2074K] Cyber Laundering.
The protection of creations of the mind, which have both a moral and a commercial value. Intellectual Property Law
The repeated acts of harassment or threatening the victim by using internet services like e-mail. Cyber Stalking
Virtual space created by computer networks, internet to make communication. Cyber Space
Ms-Access
Questions and Answers [55]
Database [SEE 2074] [SEE 2073] [SEE 2073 U] [SLC 2072] [SEE 2071 S] [SLC 2064] [SLC 2065]
A database is an organized collection of related information that can be used for different purpose so that it can easily be accessed, managed, and updated.
E.g. Dictionary, Marks Ledger, Telephone Directory etc.
Electronic Database [SQE 2075K]
An electronic database refers to an organized collection of data stored in a computer in such a way that its content can be easily accessed.
Computerized Database [SQE 2075K]
It can store large volume of data. It is very fast to find a specific record.
Data can be sorted into ascending or descending order on multiple criteria.
The database can be kept secure by use of passwords.
We can search data very easily.
Modification is very easy in comparison of manual database.
Non-Computerized Database
It is limited by physical storage available.
It can take a while to manually search through all of the records.
Difficult to sort data on more than one criteria.
The only security would be locking up the records.
Data [SEE 2073] [SLC 2064] [SLC 2070] [[SLC 2065 S] [SLC 2069 S]
Data can be numbers, letters or symbols representing facts and figures which may or may not give any sense.
E.g.: Ram, student, 20, etc.
Information [SLC 2070]
Information is an organized collection of related data, which gives a complete sense.
“Ram is a student. He is 20 years old.”, is information that gives a complete sense.
DBMS (Database Management System) [SEE 2075 U] [SEE 2074 U] [SLC 2066] [SLC 2067] [SLC 2067 S] [SLC 2069 S] [SQC 2075K]
DBMS is a software which helps to extract, view and manipulate data in an organized way.
In DBMS, data can be accessed, managed and updated easily.
E.g.: MS-Access, Oracle, Fox pro, Dbase etc.
RDBMS (Relational Database Management System) [SQE 2074]
RDBMS is a database management system that is based on the relation model in which data is stored in the form of tables and the relationship among the data is also stored in the form of tables.
E.g.: SQL, MS-Access, Oracle, etc.
Importance / Advantages of DBMS / Computerized database [SEE 2075] [SLC 2071]
It controls data redundancy which means duplication of data.
It allows sharing the existing data by different programs.
Large volume of data can be stored and updated easily.
It provides high security of data as well as maintains accurate database.
MS-Access
MS-Access is a relational database management system developed by Microsoft Corporation which is used to store and manipulates large volume of data in the form of table.
Features of MS-Access
It provides the flexible ways to add, edit, delete and display the related data.
Queries help to view, change and analyse the data indifferent ways.
Forms are used for viewing and editing the information.
Reports are used for summarizing and printing the data.
Objects of MS-Access [SEE 2074 U] [SLC 2071]
a) Table b) Form c) Query d) Report
Define table.
Table is an object of Ms-Access that stores large volume of data in the form of rows and columns.
The different ways to create table are:
i) Design view
ii) Using wizard
iii) Entering data
Importance of table
Different properties of a field can be set in a table.
It provides options for primary key which helps to make data consistent.
Form [SEE 2073 U] [SLC 2064] [SLC 2066] [SLC 2068] [SLC 2065 S] [SLC 2069 S] [SQE 2075K]
[SQE 2074]
Form is an object of Ms-Access which provides graphical interface to enter data into the tables or multiple linked tables.
Forms are usually displayed on the screen.
Forms generally provide a detailed took at records and usually for the people who actually work with the database.
Methods to create a form are:
i) By using auto forms features.
ii) By using the form wizard features.
iii) By using your own in design view.
Importance / Function / Advantages of form [SEE 2075] [SLC 2064] [SLC 2066] [SLC 2065 S]
[SLC 2070 S] [SQE 2074]
It provides an interactive platform for input of data into the database.
It helps to display data in more presentable form than a datasheet.
It gives a separate platform to handle data.
Query [SEE 2075 U] [SEE 2075 S2] [SLC 2072] [SLC 2065] [SLC 2069] [SEE 2066 S] [SLC 2068 S]
[MM 2076] [PMT 2075K]
Query is an object of Ms-Access which extracts and arranges information from a table in a manner that is specified.
The different types of query are:
i) Select query
ii) Action query
In action query, we have update query, append query, delete query and make-table query.
Advantages of query [SLC 2065]
We can filer, perform calculations and summarize data.
Large volume of records can be updated or deleted at a same time.
It retrieves and display records including some fields or all the fields of a table or multiple linked tables.
Purposes of query in MS-Access [PMT 2075K]
To view records including some fields or all the fields of a table or multiple linked tables.
To perform mathematical calculation of a data.
To sort the records on the basis of one or more key fields.
To perform mass update, delete or append new records to a table.
Select query
A select query is the most common category and is used for extracting specific information from one or more tables in a database. It cannot make changes in tales.
We use select query to group records and perform calculations on field values in the groups such as sum, count, average, minimum and maximum.
Action query
Action query is a query which makes changes to many records in just one operation.
Update query
Update query is a type of action query which make global changes to a group of records in one or more tables.
Append query
The use of append query is to add a group of records at the end from one or more tables. It can do changes in tables by update, append.
Report [SEE 2074 U] [SEE 2071 S] [SLC 2070] [SLC 2067 S]
Report is an object of Ms-Access which displays the output in an effective way to present the data in a printed format.
Reports can be previewed on the screen, but they are usually printed.
Reports are often used to group and summarize data, and are often for the people who don’t work with the database but who use its information for other business task.
The data sources for report are table and query.
The methods of creating report are:
i) Using design view
ii) Using report wizard
Why is Report created? [SEE 2075 U] [SLC 2067]
Report is created to print documents according to user’s specifications of the summarized information through query or table.
Importance of report [SEE 2071 S] [SLC 2070] [SLC 2067 S]
It helps to prepare well formatted output.
It displays the information the way we want to view it.
It presents the information retrieved through queries or tables.
It presents the information in designed layouts by adding necessary titles, setting font colour or font size, etc.
What are the advantages of form over table?
Ans: The advantages of form over a table are:
i) It allows to design the layout of field on screen in any arrangement.
ii) It shows only the information we want to see.
iii) It can display one complete record at a time.
Data type [SEE 2075 S2] [SEE 2074] [SEE 2073] [SLC 2072] [SLC 2064] [SLC 2066] [SLC 2070]
Data type is an attribute for a field that determines what type of data it can contain.
Any four data types of MS-Access are:
i) Text
ii) Number
iii) Memo
iv) Currency
While designing table structure which data types are suitable to store information about teacher’s name, address, salary and date of birth. [SLC 2065] [SLC 2068 S]
Teacher’s name - Text
Address – Text
Salary – Currency
Date of birth – Date/Time
Identify a record, field and value from the following table structure. [SQE 2074]
Roll Name Marks
1 Kopila 87
2 Rabin Rana 56
Ans: Record = 1 Kopila 87, 2 Prabin Rana 56
Field = Roll, Name, Marks
Value = 87, 56
What happens when we enter text in a numeric field?
Ans: If we enter text in a numeric field then it displays the errors.
Text
It is used for storing text or combination of text and numbers. It can store up to 255 characters.
Memo
It is used for storing lengthy text and numbers. It can store up to 65,535 characters.
Field properties
The four types of field properties of MS-Access are:
i) Caption ii) Format iii) Validation rule iv) Input mask
Input mask
Input mask is a field property that controls the value of a record and sets in a specific format.
Caption
Caption is a field property which displays an alternate name for the field to make the field name more explanatory. It can contain up to 2048 characters.
Validation rule:
A field property which enables to limit values that can be accepted into a field is known as validation rule.
Validation text
A field property which allows type text to be displayed if the user input value is prohibited by the validation rule is known as validation text.
Field size
Field size is a field property that specifies the maximum number of characters allowed in the field.
Format
The use of ‘Format’ field property is to display data in a different format.
Lookup Wizard
The use of Lookup Wizard is that it creates a field that allows choosing a value from another table or from a list of values by using a list box or combo box.
Hyperlink
The use of Hyperlink is that it stores hyper like addresses like email addresses, websites, database objects or other field.
Indexing
Indexing is one of the important properties of database that speed up searching and storing of records using on the field.
Relationship
Relationship is an association among several entities (table). Its types are:
i)One to one relationship
ii)One to many relationship
iii)Many to many relationship
Referential integrity
Referential integrity is a set of rules used by RDBMS to make sure that the relationships between tables are valid and that the related data is not accidentally changed or deleted.
Record [SEE 2075 S2]
Record is complete set of information. Record is a collection of multiple related fields in a row which gives complete information about a person or thing. E.g.: Ram Chabahil 4468790
Field [SEE 2075 S2]
Field is a small unit of information. A column in a table is called field, and it contains a specific piece of information within a record. E.g.: Name, Address, Telephone
Sorting [SEE 2073 U] [SLC 2068]
Sorting is the process of arranging the record in ascending or descending order according to a given field or fields. Sorted data is easier to handle than unsorted data. The advantages of sorting are:
i) It helps to find specific information quickly.
ii) It helps to arrange data in alphabetical order.
Filtering
Filtering is an option that selects the required records and displays the result.
Primary key [SEE 2075] [SEE 2073] [SEE 2071 S] [SLC 2067] [MM 2076] [PMT 2075K]
A key that uniquely identifies each record in a database is primary key. It is needed because it neither accepts duplicate values now null values.
Uses of Primary key [SLC 2069]
i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.
Purpose of Primary key [PMT 2075K]
A primary key prevents duplicate records from being entered in the table and is used to control the order in which records display in the table. This makes it faster for databases to locate records in the table and to process other operations. The primary key is also used to create a link between tables in a database.
Importance of Primary Key [SEE 2073] [SLC 2069 S] [MM 2076]
It does not allow duplicate data.
It does not allow null value
Composite key
The group of primary key that consists of two or more attributes is called composite key.
Foreign Key
Foreign key is a unique field or combination of fields in linked table whose value matches with a primary key in another table.
Data Redundancy [SEE 2074]
Data redundancy means repetition of same piece of data in a database in more than one location.. Data redundancy can be controlled in MS-Access by normalization of database.
MCQ (Multiple Choice Questions) [80]
Database is a
i.tool of editing documents ii. way to automate common tasks
iii. collection of related information
A (n) ____________________ is an organized collection of the related information.
Object database Property document
Which is the database?
Data of SLC Exam Oracle MS-Access Excel
A database is the collection of __________[PMT 2075]
i. Hardware ii. Software iii. Record iv. None of these
Which is not the database?
i. Phone diary ii. Mark ledger iii. Attendance Register iv. Report Card
Which is the example of Relational Database Management System?
i.Oracle ii.FoxBASE iii.Sybase iv.FoxPro
__________ is a Database Management System.
DBase MSAV EXCEL All of above
Ms-Access is a ............ software. [SEE 2075 S2]
(i) Word processing (ii) DBMS (iii) Spreadsheet (iv) Web
MS-Access is a
DBMS RDBMS Database Metabase
MS-Access is used to create _____________.
Database DBMS Record Table
___________ is not DBMS.
Oracle dBase FoxPro Paint
Which is an example of database? [SLC 2064]
DBase MS-Access Telephone Directory All
…………… is the DBMS. [SLC 2065]
i) Fox-Pro ii) MS-Excel iii) Lotus-123 iv) All of the above
Which of the following is database application? [SLC 2070]
i) MS-Word ii) MS-Access iii) MS-Excel iv) QBASIC
Which of the following is not a database application? [SLC 2069]
i) Oracle ii) Foxpro iii) MS-Access iv) MS-Excel
MS-Access is a ------------ software.
i. Utility ii. Application iii. System iv. None of the above.
Which is DBMS?
i. Database ii. Metabase iii. dBase iv. MS-Excel.
A Database Management System can be used to .
i. retrieve information ii. search information iii. sort information iv. all of the above
___________________ is a set of rules used by Access to ensure that the relationships between tables are valid and that the related data is not accidentally changed or deleted.
Relationship Referential integrity Query Forms
What is extension of access database? (MS-Access 2003 version) [SLC 2066]
DBF MDB MBD DBM
_____ is the table design creating option to create custom table design.
Datasheet Design view Wizard Link Table
_____ is a data type used for lengthy text and numbers
Text Long Text OLE Object Memo
A field name can be up to _____ characters long. [MM 2076]
40 46 64 2048
Data type that requires 8 bytes of storage.
Yes/No Currency Long Integer All of them
Memory space consumed by a currency data type maximally is …………[SLC 2069]
i) 2 bytes ii) 4 bytes iii) 8 bytes iv) 1 GB
The data type appropriate to store salary is: [SLC 2067]
i)Memo ii)Currency iii)Text iv) Auto number
The name of caption can be declared up to _____ characters.
1024 2024 2048 2005
Memory space used by a auto number data type is _____
1 Byte 2 Bytes 4 Bytes 8 Bytes
What is the default size of Access?
(i) 10 (ii) 20 (iii) 30 (iv) 50
Date/Time occupies ………. bytes of memory. [SLC 2066] [SLC 2067] [MM 2076] [PMT 2075]
i) 4 ii) 2 iii) 8 iv) 16
The maximum size of text field in MS-Access is …………. [SLC 2068 S] [SLC 2070]
i) 50 ii) 10 iii) 6400 iv) 255
Format symbol that converts all characters to uppercase.
@ & < >
…………… is not the data type of MS-Access. [SLC 2065] [SLC 2068]
i) Number ii) Text iii) Memo iv) Form
The logical field data type of MS-Access is______________ [SLC 2064]
i. Yes/No ii. True/False iii. On/Off iv. All of the above.
The field size of logical field data type is __________ in MS-Access.
i. 1 bit ii. 1 byte iii. 2 bytes iv. 2 bits
Which data type consumes the least storage space? [SEE 2074]
(i) Text (ii) Yes/No (iii) OLE object (iv) Memo
Which of the following data type is appropriate to store gender of person in terms M or F?
i. Memo ii. Currency iii. Yes no iv. Auto number
The default data type of MS-Access is: [SLC 2068 S] [SLC 2069] [SEE 2074] [SQE 2074K]
i) Number ii)Text iii) Memo iv) Auto number
The default field size of “AutoNumber” data type is [SEE 2075 S2] .
i. Byte ii. Integer iii. Long Integer iv. Long Integer
Which is the subtypes for the number data type?
Hyperlink Bit Index Integer
Which is the subtype of number data type?
i. Integer ii. Byte iii. Single iv. All of the above.
Number field is used for storing only _______________.
Number Text and Number Number and Time Number and Year
The datatype which is used for only integer value.
i.text ii.currency iii.number iv.OLE
Which is not MS-Access object? [SQE 2074K]
a) Form b) Query c) Caption d) Table
Which of the following is not a Microsoft Access database object? [PMT 2075]
i. Tables ii. Queries iii. Forms iv. Sorting
Which of them is not a data type?
Memo Yes/No Time/Date Caption
Which of the following is not a data type?
i. Picture ii.date/time iii.text iv.number
Which of the following is not the data type used in MS-Access?
i. Date/Time ii. Counter iii. Hyperlink iv. Caption
Which of the following is not a data type in Microsoft Access?
i. Text ii. Currency iii. Hypertext iv. Date/Time
What field type is used to store picture in a table?
i.memo ii.OLE iii.hyperlink iv.None
Which is suitable data type to store video? [SLC 2070] [SEE 2073]
i) Text ii) Number iii) Hyperlink iv) OLE object
The data type appropriate to store address is .
i. Memo ii. Currency iii. Text iv. Auto number
What kind of data is kept in memo field?
(i) Hyperlink (ii) Software (iii) Data (iv) Pictures
What kind of data are kept in memo field?
i.Name of Student ii.Students phone number iii.Students Bio data iv.Students picture
Which specifies the expression that checks the invalid data? [MM 2076]
Validation Rule Validation Text Input Mask Required
_____ is not a field property of MS-Access.
Caption Index Color Format
…………… defines a standard pattern for the appearance of all data entered in the field
i.format ii.input mask iii.default value
A field property that limits the data to be entered in a field is___________
i. Validation Rule ii. Format iii. Input Mask iv. Indexed
The maximum number of characters that can be stored in a field is determined by_
i. Field Type ii. Field Size iii. Field Length iv. Field width
Field size, format, input mask, caption and default values are: [SQE 2074K]
Key elements field properties Navigating modes data types
The primary key contains _____ value.
Null No Null Number Auto number
The _________________ key uniquely identifies each record. [SLC 2066]
Primary database Object premier
Primary key does not accept …………… [SLC 2064] [SLC 2065] [SLC 2068] [SEE 2074] [SQE 2074K]
i) Text ii) Number iii) Null value iv) None of the above
In MS-Access data are stored in ……………… [SLC 2068]
i) Form ii) Query iii) Table iv) All of the above
Form is designed for
i. filters data ii. Sort data iii. Print data iv. Modify data
Which component of MS-Access is used to enter data? [SLC 2065]
i. Query ii. Forms iii. Report iv. Both (i) and (ii)
Which component of MS-ACCESS does not allow entering data? [SLC 2064]
i. Table ii. Query iii. Form iv. None of them
Query is used to
i. retrieves data from database ii. Create table in database iii. Print database iv. All
…………….. query changes value in main table. [SLC 2068 S]
i) Select ii) Update iii) Both (i) &(ii) iv) None of the above
Which is not a type of query? [SLC 2067] [SEE 2073]
i) Search ii) Select iii) Update iv)All of the above
Report can be generated by using data from …………[SLC 2068 S]
i) Table ii) Query iii) Forms iv) Both (i) &(ii)
……………….. object of access is used to print formatted data. [SLC 2068] [SEE 2073]
i) Query ii) Form iii) Report iv) Table
The object of MS-Access that is used to generate hard copy of records. [SLC 2066]
i) Query ii) Table iii) Form iv) Report
__________allows MS-Access to query and sort record faster. [SEE 2075 S2]
i. Sorting ii. Editing iii. Filtering iv. Indexing
A collection of records for a single subject, such as all of the customer records. [PMT 2075]
i. Field ii. Record iii. Table iv. Data
Collecting multiple related fields is called: [SLC 2067]
i) Records ii)Table iii) Forms iv)Query
Record of the table is also knows as ...... [SEE 2075 S2]
(i) Tuple (ii) Field (iii) Text (iv) All
A field is also known as [MM 2076]
i.records ii. column iii.Database iv.entity
Row is also called …………[SLC 2069] [SEE 2074]
i) Record ii) Field iii) Database iv) Table
The columns in database tables are called: [SLC 2070] [SEE 2073]
i) Record ii) Field iii) Report iv) Memo
Fill in the Blanks [35]
Database is an organized collection of related data in tabular form.
A collection of related data of a person or anything is known as database.
DBMS is a general program designed to manage a database.
DBMS is a complex set of software program that controls the organization, storage, management, retrieval of data in database.
Ms-Access is a relational database management system where data is arranged in the form of tables .
Data is the raw facts to generate information.
Information is the processed value which we get after we get after processing by the computer.
SQL stands for structured query language.
A primary key cannot contain the null values.
A primary key is a fixed field which uniquely identifies every record in a table.
You cannot enter duplicate values in a primary field.
Foreign key is the linking field between two values.
A combination of two or more keys which can be used as a primary key is called a composite key.
A text data type allows the field to contain up to 255characters.
The default field size for text type is 50 characters.
Memo field can hold 65535 characters.
Maximum width of field is 64 characters.
An input mask is the format we will assign for the introduction of values into a field.
The default value property is used to define a default value that is automatically entered in field when you add a new record, at o time of data entry.
Filtering allows you to retrieve specific information from a table in Microsoft Access 2003.
A column in a table is called field and row in a table is called record.
The smallest unit of data organization is called a field.
Auto number field type automatically enters number in a field which increase by one for every new record.
We can change data type of field in table design view.
Validation rule is used to make sure that the data entered in a field is within the criteria set by the user.
A table contains records and field.
Query help us to retrieve and view only those records from the database tables that meet a specific condition or criteria set by us.
A query is a database object that creates a datasheet of selected fields and records from one or more tables.
A query extracts and arranges information from a table in a manner that you specify.
Action query is used to change record in a table at a single operation.
Delete query is used to delete records from the table.
Query that makes changes in table is called update query
A form is a database object used primarily to display records on screen, to make it easier to enter new records and to make changes to the existing records.
The report design View window is the place where you design reports from a scratch or add your own touches to reports you create with the report wizard.
Report enables you to format your data in an attracting and informative layout for printing.
True / False [100]
A database can be managed manually. True
DBMS is application software. True
Microsoft Access is a Relational Database Management System. True
A database file of MS-Access can have only one table. False
The extension of MS-Access database file is MDB. True
DBMS is word processing software. False
Default data type of MS-Access is a number. False
MS-ACCESS is spread-sheet software. [SLC 2065 S] False
MS-Access is not a spreadsheet software. [SLC 2071 S] True
The extension of database file created by MS-Access is .BDF. [SLC 2066 S] False
MS-Access is not spreadsheet software. [SLC 2067 S] True
A database can contain multiple tables. [SLC 2069 S]True
MS-Access is DBMS software. [SLC 2072] True
A field name refers to the category of information about a subject. True
Field names are used to define properties for a database. False
A field name can be upto 255 characters long. [SQE 2075K] False
You cannot delete a field in a database once they have been defined. False
Removing a primary key does not delete a field. True
The data in primary key field need to be unique and not null. [SLC 2065 S] [SLC 2072] True
The primary key is an optional field in MS-Access table. True
The primary key in a table is a field that contains information unique to the records. True
The primary key field of a table allows the duplication of data. False
Primary key field may contain the same value in two records. False
Primary key does not accept null value. [SLC 2066 S] True
The primary key field can also be left empty. [SLC 2067 S] True
Primary key field can accept duplicate values . [SEE 2075 U] False
Primary key accepts null value. [SEE 2074 U] [SLC 2071 S] False
Many related fields makeup a record and many records makeup table. True
A query is used to select fields and records from one or more tables. [SLC 2065 S] True
Queries are used to display records onscreen to make them easier to enter new records and to make change in existing records. False
A select query retrieve data from one or more tables using criteria you specify. True
An action query makes changes in a table. [SLC 2071] [SEE 2074 U] True
A query is used to select fields and records from only one table. [SLC 2072] False
Update Query does not change the data of table. [SLC 2070 S] False
A query is used to select fields and records from many tables. [SLC 2065 S] [SLC 2067 S] True
A query is database object that creates a datasheet of selected fields and records from one or more tables. True
A query cannot be the source for a form. False
Query can be used to apply mathematical calculations in the table.
Queries are used to display records onscreen to make them easier to enter new records and to make change in existing records. False
A query is a collection of related data stored in an organized manner. False
A query can be created without tables. False
Query allows viewing the desired records only. False
Select query is used to retrieve and display records from the selected table. [SEE 2075] True
Database has been being used knowingly or unknowingly in our daily life. True
The maximum field size of text field is 255 characters. [SEE 2075 U] True
Pictures and graphics cannot be stored in the table in MS Access 2007. False
A form is an object of MS-Access used for entering data. [SLC 2071] True
A form allows displaying one complete information at once. True
We can make the form as the source of table. False
Form allows you to select specific data from one or more tables. False
Form is a graphical interface through which data can be printed or displayed is specified format. False
Report is used to enter the data into the table in MS-Access 2007. False
A report can be used to modify data of a table. False
Report is used to prepare database for final printing. True
A report can be used to delete record from a table. False
Report is a database object used to print final report. [SEE 2073 U] True
Index makes sort process fast. [SLC 2070 S]True
Index increases the speed of the query and sort operations. [SLC 2067 S] [SLC 2071 S] True
Index decreases the speed of the query and sort operations. [SLC 2065 S] [SLC 2072] False
Indexing is the process of arranging the records in ascending or descending order. [SEE 2075] False
Arranging all the records in a table either ascending or descending order is known as filtering. [SEE 2073 U] False
Indexed field property speeds up searching and sorting of records based on a field. True
A row in a table is known as record. [SLC 2069 S]True
Collecting multiple related fields is called report.[ SQE 2075K] [False]
A row in a table is called field and it contains a specific piece of informarion within a record. False
Column is also called field [SEE 2075 U]. True
Lookup Wizard is a tool that automates many database tasks. True
Money is a data type used in MS-Access. [SEE 2073 U] False
Table is not the data type of MS-Access. [SLC 2071 S] True
Default field size of text type of data is 65535 characters. False
Date/Time type of data requires 8 bytes of memory. True
The size of currency data type is 10 Bytes. [SEE 2075] False
FORMAT property allows us to delete data from database. False
Subtype of number data type is integer. True
Deleting a field does not delete data in the field. False
Validation rule is used to specify whether a value is required in a field. True
Validation rule specifies the expression that checks the invalid data. True[ SQE 2075K]
Validation rule will limit data entry. [SEE 2075] True
You cannot insert any field after entering data in the table. False
Logical field has the size 2. False
The information can be used as data for the further processing. True
The Auto Number data type generates random number automatically whenever a new record is added to a table. False
We cannot change data type of a field. False
Memo field is used to store long information beyond of the text. True
Yes/No Logical field stores one bit of data. True
OLE is the data type of MS Access. [SQE 2075K] True
Logical value can also be stored in database. True
A field can’t be declared with data type. True
Hyperlink field type in used to store photographs. False
Data validation enables you to limit the values that can be accepted into a field. True
A default value is one that is not displayed automatically for the field into a field. False
The data filter selects the required records and displays the result. True
Memo data type cannot be indexed. [SLC 2066 S] True
The default size of text data type is 50. [SLC 2066 S] True
Text is and object of MS-Access. [SEE 2075 U] False
Default text field size is of 255 characters. [SLC 2069 S] False
Data like sound and pictures are held by memo data type. [SLC 2069 S] False
Auto number data type is used to store data supplied by us. [SLC 2070 S] False
Auto Number Data consumed 2 bytes of memory space. [SEE 2075 U] False
Maximum data size of an auto number is 4 bytes. [SEE 2073 U] True
Formatted document is also called report. [SLC 2070 S] True
Graphics can also be stored in MS-Access database. [SLC 2071] [SEE 2074 U]True
Maximum field size of memo field is 256 characters. [SLC 2071] False
Match the following – MS Access [30]
1. [SLC 2065 S] 2. [SLC 2066]
MS-ACCESS (d) analyze and present data in a printed format Default value (c) 255 Characters
Data update (b) Query Fox Pro (d) Column Name
Field (c) a piece of information related to someone or something Text (b) DBMS
Report (a) Database management software Field (a)Field Properties
(-) collection of related fields (-) Search fast
3. [SLC 2066 S] 4. [SLC 2067]
OLE (d) Formatted output OLE (d)Report
Primary key (c) Interface Data entry (a) Picture
Form (-) 64,000 characters Indexing (-) Table
Report (b) Unique Field Formatted printout (c)Fast searching
(a) Picture (b)Form
5. [SLC 2067 S] 6. [SLC 2068]
MS-Access (d) DATA entry and editing interface Indexing (c) Limits the value
Query (-) Electronic Spreadsheet software Report (d) Data type
Record (b) Tool to retrieve data from one or more than one tables Validation Rule (-) Error messages
Form (a) Data base management software Hyper link (b) Final output
(c) Collection of related fields (a) Search fast
7. [SLC 2068 S] 8. [SLC 2069]
Indexing data (d) Retrieves data conditionally OLE (d) Data Entry
Long Text (c) DBMS Hyperlink (c) Formatted Hardcopy
Fox Pro (b) Memo field Report (a) 1 GB
Query (a) Searching fast Form (-) Up to 255 characters
(-) Report (b) Up to 2048 characters
9. [SLC 2069 S] 10. [SLC 2070]
Report (b) Data type Indexing Data (d) Size upto 1 GB
Currency (d) Column Form (c) Column of datasheet
Long Text (a) Database object Field (-) Row on a datasheet
Field (-) Record OLE object (a) Searching Fast
(c) Memo (b) Graphical interface for data entry
11. [SLC 2070 S] 12. [SLC 2071]
dBASE (c)OLE Indexing data (b)Final output
Primary key (d)Memo Report (d)View data
Photo (a)DBMS Yes/No (a)Searching fast
Long text (b)Uniquely defined Select query (-)Picture
()Hyper links (c)Data type
13. [SLC 2072] 14. [SLC 2065] [SEE 2073]
OLE (c) Data Entry Query (d) Printed format
Validation Rule (-) Stores data Form (c) Stores data
Form (b) Limits the value Table b) Allows view, edit, input data
Indexing (a) Data type Report (a) Extracts selected record for view
(d) Easy to search (-) DBMS
15. [SEE 2074] 16. [SEE 2075 U]
Data (b) Input, view, edit data Caption (d) Logical data type
Form (c) Formated output OLE (-) Error Message
Report (a) Collection of raw facts Data Redundancy (b) Picture
Table (-) Question to the database Yes/No (a) Label for field
(d) Stores data in database (c) Duplication of data
17. 18.
Data redundancy (b)Error message a. Indexing data (a)Searching fast
Validation Text (c)Pattern of data in a field b. Long text (d)Caption
Input Mask (d)Limits the value c. FoxPro (b)Memo field
Validation Rule (a)Data duplication d. Label for a field (c)DBMS
19. 20.
Text (d)2048 characters a. Data type (b)Field property
Currency (a)up to 255 Characters b. Format (d)Relationship
Memo (b)8 Bytes c. Form (a)Memo
Hyperlink (c)0-65535 Characters d. One-to-one (c)Database Object
21. 22.
Data Integrity (c)No. of character can be entered Index (c)Tuple
Automatic (d)Contains distinct value Data redundancy (d)software
Field size (a)Validation Rule Record (a)easy to search
Primary key (b)Default value DBMS (b)repetition of data
23. 24.
Sort (d) mass change Number (d)50
Single precision (c)DBMS Yes/No (c)8 bytes
FoxPro (a)Arranging data Currency (a)Long integer
Update query (b)sub type of number Text (b)1 bit
25. [SEE 2075] 26. [SEE 2075 S2]
Yes / No b) 4 bytes Table d) Printed format
Long integer d) MS Access object Primary Key c) Allows viewing editing and inputting data
OLE c) Picture Form b) uniquely defined
Report a) 1 bit Report a) stores data
8 bytes Extracts selected record for view
27. [SEE 2074 U] 28. [SEE 2073 U] [SEE 2071 S]
Form b) Column on datasheet Ms-Access d) data entry and editing interface
Field c) Data type Query - electronic spreadsheet software
Currency a) Graphical interface for data entry Record b) tool to retrieve data from one or more tables.
Query - DBMS Form a) database management software
d) Retrieves data conditionally c) collection of related fields
29. [MM 2076] 30. [SQE 2075K]
Hyperlink d) Label for a field Query b) View data
Fox Pro a) Data type Report c) Relationship
Memo b) DBMS One to One d) Action query
Caption c) Long text Delete Query a) Extract selected data
Database software
[SQE 2074K] 32. [PMT 2075]
Show final output b) Form Data type b) Field property
Data Entry c) Design View Format d) Relationship
Change the table structure d) Field Properties Form Referential integrity
Validation Rule a) Report One to one c) Database object
a) Memo
Full Forms [200]
1 NIC Network Interface Card
2 FTP File Transfer Protocol
3 POP Post Office Protocol
4 UTP Unshielded Twisted Pair
5 SMTP Simple Mail Transfer Protocol
6 URL Uniform Resource Locator
7 HTTP Hyper Text Transfer Protocol
8 WWW World Wide Web
9 MAN Metropolitan Area Network
10 UPS Uninterruptible Power Supply
11 VOIP Voice Over Internet Protocol
12 NOS Network Operating System
13 DVD Digital Versatile Disk
14 ISP Internet Service Provider
15 LAN Local Area Network
16 ADSL Asymmetric Digital Subscriber Line
17 ICT Information and Communication Technology
18 IRC Internet Relay Chat
19 PDF Portable Document Format
20 STP Shielded Twisted Pair
21 WAN Wide Area Network
22 ISDN Integrated Services Digital Network
23 MBR Master Boot Record
25 VSAT Very Small Aperture Terminal
26 TCP/IP Transmission Control Protocol/Internet Protocol
27 DNS Domain Name Service
28 TCP Transmission Control Protocol
29 WI-MAX Worldwide Interoperability for Microwave Access
30 WLAN Wireless Local Area Network
31 ARPA Advanced Research Projects Agency
32 BNC British Naval Connector
33 bps bits per second
34 CCTV Closed Circuit Television
35 CD-ROM Compact Disk Read Only Memory
36 CVT Constant Voltage Transformer
37 GPRS General Packet Radio Service
38 JPEG Joint Photographic Experts Group
39 MODEM Modulator Demodulator
40 MUK Multimedia Upgrade Kits
41 SIM Subscriber Identification Module
42 W3C World Wide Web Consortium
43 Wi-Fi Wireless Fidelity
44 ARP Address Resolution Protocol
45 ARPANET Advanced Research Projects Agency Network
46 ASCII American Standard Code for Information Interchange
47 AVG Anti-Virus Guard
48 BBS Bulletin Board System
49 bits binary digit
50 CAD Computer Aided Designing
51 CAL Computer Aided Learning
52 CDMA Code Division Multiple Access
53 EMI Electro - Magnetic Interference
54 GIF Graphics Interchange Format
55 IAB Internet Architecture Board
56 IEEE Institute of Electrical and Electronics Engineers
57 MAC Media Access Control
58 NITC National Information Technology Centre
59 .ORG Organization
60 ANSI American National Standards Institute
61 ATM Automated Teller Machine
62 CAI Computer Aided Instruction
63 DDoS Distributed Denial of Service
64 EBCDIC Extended Binary Coded Decimal Interchange Code
65 FAQ Frequently Asked Questions
66 FM Frequency Modulation
67 Gbps Gigabits per second
68 GPL General Public License
69 IPX/SPX Internetwork Packet Exchange/ Sequenced Packet Exchange
70 ISOC Internet Society
71 Kbps Kilobits per second
72 MBPS Mega Bytes Per Second
73 MPEG Moving Picture Experts Group
74 MSAV Multistation Anti Virus
75 NAT Network Address Translation
76 NAV Norton Anti Virus
77 OS Operating System
78 PSTN Public Switched Telephone Network
79 SQL Structured Query Language
80 USB Universal Serial Bus
81 VHF Very High Frequency
82 VRML Virtual Reality Modeling Language
83 3D Third Dimension
84 3G Third Generation
85 4GL Fourth Generation Language
86 AC Alternating Current
87 AI Artificial Intelligence
88 AM Amplitude Modulation
89 AP Access Point
90 ARC Net Attached Resource Computer Network
91 AVI Audio Video Interleaved
92 BCC Blind Carbon Copy
93 B-ISDN Broadband Integrated Services Digital Network
94 Blog Web Log
95 BMP Bitmap
96 CAE Computer Aided Education
97 CAM Computer Aided Manufacturing
98 CAN Campus Area Network
99 CATV Cable Television
100 CAVE Cave Automatic Virtual Environment
101 CBL Computer Based Learning
102 CBT Computer Based Training
103 CCA Controller of Certification Authority
104 CD-RW Compact DisK ReWritable
105 CMOS Complementary Metal-Oxide Semiconductor
106 COBOL Common Business Oriented Language
107 CRBT Caller Ring Back Tone
108 CSMA/CD Carrier Sense Multiple Access with Collision Detection
109 CSU/DSU Channel Service Unit / Data Service Unit
110 DARPA Defense Advanced Research Projects Agency
111 DBA Database Administrator
112 DBMS Database Management System
113 DHCP Dynamic Host Configuration Protocol
114 DIX Digital Intel Xerox
115 DOD Department Of Defense
116 DOS Disk Operating System
117 DTH Direct To Home
118 DVD-RW Digital Versatile Disk Rewritable
119 E-Commerce Electronic Commerce
120 EDI Electronic Document Interchange
121 E-Fax Electronic Fax
122 E-mail Electronic Mail
123 ETDSA Electronic Transaction and Digital Signature Act
124 FAT File Allocation Table
125 FAX Facsimile
126 FC Ferrule Connector
127 FCRA Fair Credit Reporting Act
128 FDDI Fiber Distributed Data Interface
129 FTTH Fiber To The Home
130 GSM Global System for Mobile Communications
131 HDD Hard Disk Drive
132 HTML Hyper Text Markup Language
133 HTTPS Hyper Text Transfer Protocol Secure
134 ICMP Internet Control Message Protocol
135 IE Internet Explorer
136 IESG Internet Engineering Steering Group
137 IETF Internet Engineering Task Force
138 IIS Internet Information Services
139 IMAP Internet Mail Access Protocol
140 INIC Internet Network Information Center
141 INTERNET International Network
142 IP Internet Protocol
143 IPR Intellectual Property Rights
144 IPX Internetwork Packet Exchange
145 IRTF Internet Research Task Force
146 IS Information System
147 ISA Industry Standard Architecture
148 ISO International Organization for Standardization
149 IT Information Technology
150 LCD Liquid Crystal Display
151 LED Light Emitting Diode
152 MIDI Musical Instrument Digital Interface
153 MILNet Military Network
154 MMS Multimedia Messaging Service
155 MOST Ministry of Science and Technology
156 MoSTE Ministry of Science, Technology and Environment
157 MSAU MultiStation Access Unit
158 NetBEUI NetBIOS Extended User Interface
159 NETBIOS Network Basic Input/Output System
160 NITCC National Information Technology Co-ordination Committee
161 NITDC National Information Technology Development Committee
162 NSF National Science Foundation
163 NSFNet National Science Foundation Network
164 NTC Nepal Telecom
165 PAN Personal Area Network
166 PAT Port Address Translation
167 PCO Public Call Office
168 PIN Personal Identification Number
169 PKI Public Key Infrastructure
170 PM Phase Modulation
171 PSK Phase Shift Keying
172 PUK Personal Unlocking Key
173 RAM Random Access Memory
174 RDBMS Relational Database Management Software
175 RF Radio Frequency
176 RGB Red Green Blue
177 RIP Routing Information Protocol
178 RJ – 45 Registered Jack-45
179 ROM Read Only Memory
180 ROMBIOS Read Only Memory Basic Input Output System
181 SC Subscriber Connector
182 SDSL Symmetric Digital Subscriber line
183 SMA Screw Mounted Adapter
184 SMS Short Message Service
185 ST Straight Tip Connector
186 STD Subscriber Trunk Dialing
187 Telnet Telecommunication Network
188 UHF Ultra High Frequency
189 UNCITRAL United Nations Commission on International Trade Law
190 UseNet User Network
191 VIRUS Vital Information Resources Under Seize
192 VLAN Virtual Local Area Network
193 VMS Voice Messaging Service
194 VPN Virtual Private Network
195 VPPA Video Privacy Protection Act
196 VR Virtual Reality
197 WAIS Wide Area Information Server
198 WAP Wireless Application Protocol
199 WPA Wi-Fi Protected Access
200 XGA Extended Graphics Array
Match the Following – Fundamentals [50]
1. [SLC 2064] 2.
Radio Wave (d) Device to connect network having different technology NCSA Mosaic (d)Internet Protocol
Cyber ethics (c) power protection device ARPA (e)Online shopping
Spike guard (-) internet WWW (b)Funded by US DOD
Gateway (b) professionally guided principles TCP/IP (c)Dr. Berners-Lee
(a) Wireless Media E-commerce (a)First web browser
3. [SLC 2065] 4. [SLC 2066]
Server (c) HTTP T-connector (b)Network device
Node (b) Work Station Bridge (d)Power protection
Protocol (a) Main Computer CD-ROM (a)Coaxial cable
Coaxial Cable (-) Repeater Spike Guard (c)Multimedia component
(d) Communication Media (-)Virus scanning
5. [SLC 2067] 6. [SLC 2068]
Satellite (-)Multimedia Microwave (c)Multimedia
HTTP (b)Protocol Volt guard (d)Protocol
Online business (a)Unguided media Sound card (a)Unguided media
Fiber optics (c)E-commerce TCP/IP (b)Power protection devices
(d)Guided media (-)Guided media
7. [SLC 2069] 8. [SLC 2070]
RJ-45 (d)Multimedia Combination of several media (c)Guided Media
WAN (c)Duplicate copy POP (d)Power Protection Device
Back up (-)Fiber optic cable UTP (a)Multimedia
Microphone (a)Twisted pair cable UPS (b)Protocol used in e-mail
(b)Internet (-)CD-ROM
9. [SLC 2071] 10. [SLC 2065 S]
E-commerce (b)Power protection device McAfee (b)Supplies continuous power
Volt guard (a)Online shopping UPS (d)Internet protocol
Satellite link (c)WAN Web Browser (a)Antivirus software
Sound card (-)Optical fiber TCP/IP (c)Internet explorer
(d)Multimedia
11. [SLC 2066 S] 12. [SLC 2067 S]
Bandwidth (b)ISP Pictures in motions (c)Guided media
Internet (-)FAT TCP/IP (a)animation
Network (a)bps UTP (d)Random Access Memory
Software security (d)NAV Volatile memory (-)CD-ROM
(c)NIC (b)Protocol used in Internet
13. [SLC 2068 S] 14. [SLC 2069 S]
LAN (b)Within a city Sound card (d)WAN
MAN (d)Internet protocol Virus (c)Internet explorer
UPS (a)Within a room Web browser (a)Multimedia
IPX/SPX (c)Power supply device Satellite link (b)damage or corrupt data
(-)Between countries (-)Bridge
15. [SLC 2070 S] 16. [SLC 2071 S]
TCP/IP (c)Multimedia Node a) Workstation
Back up (d)Web address Server d) HTTP
Sound card (b)Software security Coaxial cable c) Communication media
URL (a)Protocol Protocol b) Main computer
17. [SEE 2072] 18. [SEE 2073]
Microwave (c) Power protection device Malicious software (c) UPS
UTP (d) Protocol Primary storage device (a) virus
UPS (a) Unguided media Power protection device (d) copyright
SMTP (-) Internet Intellectual property law (b) RAM
(b) Guided media Malicious software (c) UPS
19. [SEE 2074] 20. [SEE 2075 Upgrade]
RJ 45 connector (b) Duplicate copy Microwave (d) Protocol
Back up (c) Multimedia UTP (c) Power protecting device
Microphone (a) Twisted pair cable UPS (a) Unguided media
Hub/switch (-) Ring Topology SMTP (-) Internet
(d) Star Topology (b) Guided media
21. [SEE 2075] 22. [U1]
Hub (c) Communication media LAN c) Software security
TCP/IP (a) Network connecting device Client/server d) Hardware security
UTP (d) Windows NT Back up a) Network type
NOS (b) Protocol Fire control b) Network architecture
Computer Virus
23. [SEE 2075 State 2] 24. [MFT 2075]
Backup (d) Online shopping Node Powerful computer
Microphone (a) Duplicate data Protocol d) Prevents gaining access
Web browser (-) Damage or corrupt data Scan disk c) Checking for disk error
E-commerce (b) Multimedia Firewall a) Workstation
(c) Display of web pages b) Rules for network communication
25. [SEE 2074 Upgrade] 26. [PMT 2075]
BNC (d) Two way communication Microwave c) Multimedia
URL (b) Address of web page Web browser d) Protocol
Online business (a) Connector Sound card a) Unguided media
Duplex (c) E-commerce TCP/IP b) Microsoft Edge
(-) Protocol Guided Media
27. [SEE 2073 U] 28. [SQE 2074K]
Network services (d) Power protection device NOS d) Virus
Infrared (c) E-Banking Web Page c) Transmission Media
Internet services (b) Transmission media CAT- 5 b) Any pages of the web site
Volt Guard (a) File sharing Spyware a) Windows Server
29. [SQE 2075K] 30. [MFT 2076]
Animation b) The creation and manipulation of picture images in the computer WAN c) Twisted Pair cable
Graphics d) A system that enables one or more users to move and react with computer graphics Protocol d) Coaxial cable
Multimedia a) The moving graphic images RJ45 a) Internet
VR c) The combination of different media BNC b) HTTP
31. 32. [MM 2076]
Coaxial Cable (c)RJ-45 Graphics c) Checking for disk error
Optical Fiber cable (a)BNC SMTP d) Prevents gaining access
Twisted Pair (b)ST Scandisk a) Still frame pictures
Telephone Wire (d)RJ-11 Firewall b) Network protocol
33.
Node (b)a network computer that utilizes the resources of other computer
Client (e)a set of rules by which computers communicate with each other over a network
Host (d)a self-sufficient computer that acts both as a server and a client(shares and uses resources
Peer (a)any network device that can connect to the network and can generate, process or transfer network data
Protocol (c)the most powerful type of computer on the network, that does all the processing for the user
34.
TCP/IP (a)Addressing data, converting them into packets and Routing
FTP (d)Transfer mail and attachment on the network
POP (b)Transfer files between two computers
SMTP (c)Fetching mails from the mail server to a user’s computer
35.
E-mail (e)A private network within an organization
World Wide Web (c)The opening or main page of a website
Home Page (d)The buying and selling of goods and services on internet
Electronic commerce (b) The leading information – exchange service of the internet
Intranet (a)The exchange of computer-stored messages telecommunication
36. 37.
Usenet (b)Instant Chatting Internet (c)Service of internet
MSN (c)Remote Login HTTP (d)Internet Service provider
Telnet (d)Internet component Email (a)Networks of networks
Modem (a)Newsgroup ISP (b)Protocol
(-)Website (-)online chat
38. 39.
password (c)Duplicate copy of data Antivirus (d)Software that prevent gaining access
Encryption (a)Secret word or phrase Scandisk (c)Arranging the scattered data
Backup (d)Authentication Defragmentation (b)Checking for disk error
Access Control (-)Rearrangement of fragmented file Firewall (a)Software to remove malicious Programs
(b)Scrambled and unreadable form of information
40. 41.
Hardware security (-)Rewriting the files to contiguous sector Real player (b)Upgrade the PC
Software (c) Scattering the disk file over different locations MUK (d)Headsets and data gloves
Fragmentation (d)Provide access to the computer system Animation (a)Software to view multimedia content
Password (b)Antivirus Virtual reality (c)Cartoon on television
(a)Insurance policy (-)Multimedia component
42. 43.
Backup (d)Software that destroys data Hard Lock Key (c)Hardware Security
Password (c)Utility software Spike guard (a)Software security
Scan Disk (a)Copy of data Insurance (b)Power protection device
Computer virus (b)Allows the user to access system Burlar alarm (-)Computer Security
(-)System Software (d)Prevents unauthorized entrance
44. 45.
Boot sector virus (-) McAFee Boot virus (c)Cascade
File infecting virus (c) W97M.Melissa Parasitic virus (a)Disk Killer
Macro virus (a) stoned polymorphic virus (e)Whale
Polymorphic virus (e) Frodo Script viruse (d)I LOVE YOU
Stealth virus (b) Friday the 13th stealth virus (b)Jerusalem
(d) Involuntary
46. 47.
Edutainment (c) Components of multimedia Audio (b)Monitor
Virtual Reality (d) Multimedia software Video (a)Speaker
Graphics (a) Multimedia in education Sound Card (d)Still frame pictures
Adobe Photoshop (b) Simulated software Graphics (c)Recording and playing sound
(-)Multimedia card
48.
a) Cyber stalking (c)Electronic transfer of illegally-obtained monies with the go with the goal of hiding its source and
possibly its destination
b) Phishing (e)The activity of breaking into a computer system to gain to unauthorized access
c) Cyber laundering (a)The use of communication technology, mainly the internet, to torture other individuals
d) Cyber Contraband (b)The act of attempting to acquire sensitive information like usernames, passwords and credit card details by distinguishing as a trustworthy source
e) Hacking (d)Transferring illegal items through the internet (such as encryption technology) that is banned in some locations.
49.
a) Hacking (c)The use of communication technology, mainly the Internet, to torture other individual.
b) Phishing (-)The computer program that can replicate themselves and harm the computer system on a network
(d)within the knowledge of the system users.
c) Cyber stalking (a)The activity of breaking into a computer system to gain an unauthorized access.
d) Computer viruses (e)This is one of the most serious frauds as it involved stealing money and obtaining other benefits
through the use of false identity.
e) Identity Theft (b)The act of attempting to acquire sensitive information like usernames, passwords, and credit card
details disguising as a trustworthy source.
50.
a) Digital Signature (b)Cyber crime a) Fair Credit reporting Act (d)1988
b) Forgery (a)Electronic security system b) Copyright (g)Encryption and decryption
c) Encryptions (d)Cyber law c) Cyber law of Nepal (e)1992
d) Copy right (c)Locking message d) Video Privacy Protection Act (a)1970
e) Copyright Act (c)2004
f) Federal Privacy Act (f)1974
g) Digital Signature (b)Intellectual property
Modular Programming
Questions and Answers [25]
Modular programming [SEE 2075 U] [SLC 2066] [SEE 2065 S] [MM 2076] [PMT 2075K]
Modular programming is a technique used to divide program into many small, manageable, logical and functional modules or blocks.
Qbasic is called Modular Programming [MFT 2075] [SQE 2074K]
QBasic is called modular programming because it divides program into many small, manageable, logical and functional modules or blocks.
Advantages of modular programming [SEE 2073 U] [MFT 2075] [SQE 2074K]
i) Different programmers can design different program modules independently, which is required in a large and complex program.
ii) It is easy to design code and test the program modules independently.
iii) It is possible to use a single module in different places which reduces program codes.
Main module
The top level controlling section or the entry point in modular programming is called main module.
Sub module
Module is a block of statement that solves a particular problem. Sub module is a program which is written under the main module. A program may have one or more sub modules under main module.
Procedure [SLC 2072] [SLC 2071] [SLC 2064] [SLC 2067] [SLC 2068 S] [SQE 2075K] [PMT 2075K]
Procedure is a block of statements that solves a particular program.
Procedure is a section of code which performs one or more specific tasks and can be accessed from remote location.
There are two types of procedure – SUB Procedure and FUNCTION procedure
SUB procedure [SLC 2064] [SLC 2065] [SLC 2069 S] [MM 2076]
A SUB procedure is a small, logical and manageable functional part of program which prefers specific task and does not return any value. SUB-procedure is called by CALL statement. SUB-procedure’s name does not accept data type symbol because it does not need to return a value.
FUNCTION procedure [SLC 2064] [SLC 2065] [SLC 2069 S] [MM 2076]
A FUNCTION procedure is a small, logical and manageable functional part of a program which performs specific task and returns single value to the main program or calling module. FUNCTION-procedure is called by statement and expression method. FUNCTION-procedure’s name accepts data type symbols such as $, %, !, #, &, etc. and it depends on the type of value to be returned. E.g.: FUNCTION REV$ returns string.
String function [SEE 2074 U]
String function is used with string it returns string value.
Numeric function [SEE 2074 U]
Numeric function is used with number it returns numeric value.
Library functions [SQE 2074K]
Library functions are built-in or readymade functions provided by QBASIC. E.g. MID$( ), LEN( ), SQR( ) etc.
User defined function [SLC 2066 S] [SQE 2074K]
Function which is defined by the user according to the need is called user defined function.
Parameters [SEE 2074]
Parameters are variables that will receive data (arguments value) sent to the procedures (SUB program and FUNCTION). Formal parameters are called parameter.
Arguments
Arguments are the values that are sent to the procedures (SUB program and FUNCTION). Actual or real parameters are called arguments.
CALL statement [SLC 2071] [PMT 2075K]
The function of CALL statement is to transfer the control to another procedure.
DECLARE statement
The function of DECLARE statement is to declare procedure such as FUNCTION or SUB in modular programming.
DIM SHARED statement
i) It makes variable accessible to all modules.
ii) It appears in main module/ program.
SHARED [SLC 2071]
It is used in the sub program to share the values of certain variables between main module and sub program
COMMON SHARED [SEE 2074 U]
It is used in the main program to share variable list between main module and all sub programs. This statement is used to declared variable global.
Local Variable [SEE 2075 S2]
Variables which are declared inside the procedure are called local variables. Local variables are not visible to other modules or functions. Its value is protected from outside interference and has no effect on the variables outside the procedures. Local variable can access only in its own module.
Global Variable [SEE 2075 S2]
Variables which are declared outside the procedure are called global variables. Global variables are visible to other modules or functions. Its values can be accessed from any procedure or module. Global variable can be access throughout the program
Passing arguments by value
When arguments are passed by value it makes a duplicate copy of arguments and their values (constants) are used directly in parameter. It doesn’t make any effect on values of variable which are passed to a procedure even they are changed in the procedure. To pass the argument by value, variable is enclosed in parenthesis.
Passing arguments by reference
When arguments are passed by reference the address of the variables are passed to the procedure. The changes made in the procedure’s variable will affect the variables used at calling module. By default the value is passed by reference.
Qbasic Operators [MFT 2075] [SQE 2074K]
Operators are special symbols that are meant for specific tasks or operators.
i) Arithmetic operators
ii) Relational operators
iii) Logical Operators
iv) String operator
Static variable
The variable which is declared by using the “STATIC” keyword is called static variable.
Handling of data file
Questions and Answers [25]
Data file
The file which contains data given by the user to the program and information provided by the user to the computer is called data file.
The different types of data file are:
Sequential Access files - A data file that stores a sequential data file containing name, address of some people in the same order or in sequential order is called sequential access data file. It takes long time to access if the data file contains a large volume of data. In sequential access data file we cannot change the existing entry or insert a new entry.
Random access files
Program File
The file which contains a set of instructions that are needed for data processing is called program file.
Mode of data file [SLC 2069]
Mode of data file means opening a sequential file for one of the three modes of operation like output mode, input mode and append mode.
Modes of operation for opening a sequential file
Output Mode: It is used to create a new data file and write data in it. If the file already exists its current contents will be destroyed.
Input Mode: It is used to retrieve records or contents of existing data file.
Append Mode: It is used to add more records in existing file. If the specified file does not exist APPEND mode creates it.
File number
The number assigned to a file in order to identify it during processing is called file number.
Write down the functions of:
OPEN statement: It opens a sequential file for one of the three possible operations (reading, writing, appending).
WRITE statement [SEE 2075] [MM 2076]: It sends one or more data items to the specified file. It inserts commas between the data items. It encloses strings in double quotation marks.
PRINT#: It adds spaces between data items while storing data. It does not enclose strings in double quotation marks.
CLOSE statement [SEE 2074] [SEE 2073: It closes one or all open files.
INPUT# statement [SEE 2075 U] [SEE 2075 S 2]: It reads data from the sequential data file.
EOF( ) function [SEE 2075 S 2]: It is used to test the end of records with in a file.
LINE INPUT statement: It reads the entire line or maximum 255 characters form the keyboard or the sequential file.
INPUT$ function: It reads the specified number of characters form the data file.
NAME statement [SEE 2073] [SLC 2071 S]: The NAME statement renames a file on a diskette. Only file name changes, data and program line remains intact.
KILL statement [SEE 2074]: The KILL statement deletes the file or files from the specified drive and directory.
MKDIR statement [SEE 2075 U]: It creates a subdirectory which is used to manage files.
CHDIR statement: It allows QBASIC to change from one directory to another.
RMDIR statement [SLC 2065] [SLC 2068 S]: It is used to remove or delete only the subdirectories from a disk. It can remove only empty subdirectories.
FILES statement: The FILES statement displays the files of the current sub directory or specified sub directory.
SHELL: The SHELL statement allows a program to run external programs or command line statements in Windows, MAC OS and Linux.
INT [MM 2076] [MFT 2075]: It rounds and returns the largest integer less than or equal to a numeric expression.
PRINT [PMT 2075K] : Display result on screen.
MID$ ( ) [MFT 2075]: It is a string function that returns the specified number of characters from the specified location of string.
LEN ( ) [SQE 2074K]: Returns the number of characters in a string or the number of bytes required to store a variable.
SQR ( ) [SQE 2074K]: Returns the square root of a numeric expression.
Introduction of C
Questions and Answers [20]
Structured programming
The programming that follows a top- down approach, on which developers separate the overall program structure into different sub selection, is called structured programming.
Advantages of structured programming [SEE 2075] [SLC 2066]
It is easy to design code and test the program modules independently
It is possible to use a single module in different in different places which reduces program codes.
C language
C language is a structured programming language that divides program into many functions. Dennis Ritchie at Bell telephone laboratory developed C-language in 1972 AD.
C is called middle level language because it combines elements of high level language with some features of assembler. A high level language tries to give programmer everything through built-in language. A low level language forces programmer to define function directly from user level.
C is mostly used to write system program such as operating system, language, compiler, text editor, language interpreters, utilities, etc.
C keywords are words which have special meaning for the compiler. Examples are: auto, break ,case, char etc.
Data types used in C
Data type are means to identify the type data and associated operation of handling it.
Data types used in C language [SEE 2074] [SLC 2072] [SLC 2071 S] [SLC 2065] [SLC 2068] [SLC 2070] [SEE 2065 S] [SLC 2066 S] [SLC 2067 S] [SLC 2069 S] [SLC 2070 S] [SQE 2074K]
a) char b) int c) float d) double
Data Modifiers: Data modifiers change the meaning of the basic data type to fit the various situations. The data modifiers are: short int, unsigned int and long int
Characteristics of C language [SEE 2075 U] [SEE 2075 S 2] [SLC 2071] [SLC 2067] [SLC 2069]
It is a high level language with some features of low level language.
It is mostly used to prepare system software.
It is structured programming language with function procedure.
It has enough number of inbuilt functions and operators.
It is a small programming language which occupies less memory space.
Features of C- language [SEE 2073 U]
Simple and easy to use
Occupies less memory
C is the structured programming language.
C has powerful set of operators.
C is a high level programming language.
C contains very less number of keywords
Advantages of C language
It is machine independent programming language
It is easy to learn and implemented C language
It can be implemented from mobile device to mainframe computers.
It is the mother of all modern programming language like python, pearl 5 and PHP
Disadvantages of C language
There is no runtime checking. It has poor errors detection system.
On large programs , it is hard to find errors.
There is no strict type checking int data type to float variables.
It does not support modern programming methodologies oriented programming language.
Counter
Counter is a variable which controls the loop statement and provides the track to run the loop statement in certain number times.
Accumulator
Accumulator is a numeric variable which accumulates the values in a loop statement.
Variable [SEE 2073] [SLC 2071 S] [SLC 2070] [MFT 2075]
A variable is a location in the memory of a computer whose value may change during the execution of program.
Constant
Constant are the values that do not change during the execution of a program.
Operator [SQE 2075K]
Operators are special symbols that are meant for specific tasks or operators.
The different types of C operators are:- Arithmetic operators, Assignment operators, Unary operators, Relational operators, Logical operators and Conditional operators.
Arithmetic operators are the operators that are used for manipulating arithmetic data and performs arithmetic operation. The arithmetic operators are:- +, - , * , / and %
The operator that operate on one operand variable or constant is called urinary operator. E.g. ++, - -
Logical Operator [SEE 2075]
The operators used for logical operation is called logical operator.
Selection statement.
Selection statement is a statement that allows the selective execution o statements depending on the value of an an expression. The selection statements of C program are:- If statement and Switch statement
Loop [SEE 2073] [SLC 2068] [SLC 2067 S] [SLC 2070 S]
A set of statements which is used to repeat a block of statements for a specific number of times or as long as the condition is true/false is called loop.
The looping statements provided by care:-For loop, While loop and Do.....while loop
Comparing C and QBASIC language [SEE 2074 U] [SLC 2068 S]
QBASIC C
It is a high level language without feature of low level language. It is a high level language with some features of low level language.
It is mostly used to design application software. It is mostly used to prepare system software.
It supports structure programming with sub and function procedure. It is a structured programming language with function procedure.
It is not case sensitive It is case sensitive
IBM PC version of BASIC has around 159 keywords. It has only 32 keywords.
Find Output [70]
[SLC 2065 S]
DECLARE FUNCTION Interest (p,t,r)
CLS
LET p = 30
LET t = 40
LET r = 6
LET d = Interest (p, t, r)
PRINT “The simple interest will be”; d
END
FUNCTION Interest (p, t, r)
answer= (p*t*r) /100
Interest=answer
END FUNCTION [SLC 2072]
DECLARE FUNCTION Interest (p,t,r)
CLS
LET p = 100
LET t = 2
LET r = 5
LET d = Interest (p, t, r)
PRINT "The simple interest =" ; d
END
FUNCTION Interest (p, t, r)
ans= (p*t*r) /100
Interest=ans
END FUNCTION
Output:
The simple interest will be 72 Output:
The simple interest = 10
[SLC 2064]
DECLARE FUNCTION AREA (A,B)
LET A = 30
LET B = 40
LET D = AREA(A,B)
PRINT D
END
FUNCTION AREA(A,B)
PRINT A, B
AREA=A*B
END FUNCTION [SLC 2068 S] [SLC 2070] [SLC 2073]
DECLARE FUNCTION AREA(L, B)
LET L = 10
LET B = 5
PRINT “The area=”; AREA(L, B)
END
FUNCTION AREA(L, B)
A = L*B
AREA = A
END FUNCTION
Output:
30 40
1200 Output:
The area= 50
[SLC 2071]
DECLARE FUNCTION AVGE(A, B, C)
X=10
Y=5
Z=15
AV= AVGE(X, Y, Z)
RPINT “Average of three numbers”; AV
END
FUNCTION AVGE(A, B, C)
S=A+B+C
AVGE = S/3
END FUNCTION [SLC 2067 S]
DECLARE FUNCTION Area (L,B)
LET L = 100
LET B = 20
LET ans = Area (L,B)
PRINT “The area is”; ans
END
FUNTION Area (L, B)
ar = L * B
Area = ar
END FUNCTION
Output:
Average of three numbers 10 Output:
The area is 2000
DECLARE FUNCTION AREA(L, B)
CLS
LET length = 50
LET breadth = 60
PRINT AREA (length, breadth)
PRINT AREA (10, 20)
END
FUNCTION AREA (L, B)
AREA = L * B
END FUNCTION DECLARE SUB PAT (A)
A= -144
CALL PAT (A)
END
SUB PAT(A)
B=ABS(A)
C= SQR(B)
D=C MOD 2
PRINT A, B, C, D
END SUB
Output:
3000
200 Output:
-144 144 12 0
DECLARE SUB SHOW (S)
CLS
CALL SHOW (534)
END
SUB SHOW (N)
A = N MOD 10
B = N \ 10
C = B MOD 10
D = INT (N / 100)
PRINT “Ans=”; A + C + D
END SUB DECLARE SUB VOL (L, B, H)
CLS
LET L1 = 20
LET B1 = 14
LET H1 = 2
CALL VOL(L1, B1, H1)
END
SUB VOL (L, B, H)
LET V = L * B * H
PRINT “Volume=”; V
END SUB
Output:
Ans=12 Output:
Volume=560
DECLARE SUB TEST(NUM)
CLS
CALL TEST(-5)
CALL TEST(5)
CALL TEST(0)
END
SUB TEST(NUM)
SELECT CASE NUM
CASE IS < 0
M$ = “Negative”
CASE IS > 0
M$ = “Positive”
CASE ELSE
M$ = “Zero”
END SELECT
PRINT NUM; ”is”; M$
END SUB [MM 2076]
DECLARE SUB NUM( )
CLS
CALL NUM
END
SUB NUM
A=3: B=7
FOR I =1 TO 5 STEP 2
PRINT A;
SWAP B, A
B=A+1
NEXT I
END SUB
Output:
-5 is Negative
5 is Positive
0 is Zero
Output:
3 7 8
[PMT 2075] [MFT 2076]
DECLARE SUB SER (P)
P = 15
CALL SER (P)
END
SUB SER (P)
M = 3
WHILE M < 10
PR = M * P
PRINT PR,
M = M + 2
WEND
END SUB
DECLARE SUB sum( )
CLS
CALL sum
END
SUB sum
P = 2
A = 1
FOR K = 8 to 2 STEP -2
N = N + A
PRINT N
A = A + P
NEXT K
END SUB
Output is:
45 75 105 135 Output
1
4
9
16
DECLARE SUB MIN(A, B)
CLS
A = 5
B = 10
CALL MIN(A, B)
END
SUB MIN(A, B)
IF A < B THEN
C = A + 5
PRINT C
ELSE
PRINT B ^ 2
END IF
END SUB
DECLARE SUB OUTPOOT(L, B)
CLS
LET L = 15
LET B = 10
CALL OUTPOOT(L, B)
CALL OUTPOOT(3, 6)
END
SUB OUTPOOT(L, B)
IF L < B THEN
PRINT L
ELSE
PRINT B
END IF
END SUB
Output:
10 Output:
10
3
DECLARE SUB FEBON(P, Q)
CLS
R = 2 : S = 1
CALL FEBON(R, S)
END
SUB FEBON(P, Q)
T = 1
PRINT P; Q;
LAB:
LET U = P + Q
PRINT U;
P = Q
Q = U
T = T + 1
IF T <=8 THEN GOTO LAB
END SUB DECLARE FUNCTION OUT(A, B)
CLS
D = OUT(17, 7)
PRINT D
END
FUNCTION OUT(A, B)
R = A MOD B
IF R MOD 2 = 0 THEN
C = R MOD 6 + 30
ELSE
C = R MOD 6 + 15
END IF
D = C \ 5
OUT = D
END FUNCTION
Output:
2 1 3 4 7 11 18 29 47 76 Output:
3
DECLARE SUB Result()
CLS
CALL Result
END
SUB Result
A=1
FOR I = 1 TO 5
PRINT I*A
A=A+(10^I)
NEXT I
END SUB [SLC 2066]
DECLARE SUB Series()
CALL Series
END
SUB Series
X=1
Y=1
FOR Z=1 TO 4
PRINT X;
Y=Y+1
X=X*10+Y
NEXT Z
END SUB
Output:
1
22
333
4444
55555 Output:
12 123 1234
DECLARE SUB series ( )
CALL series
END
SUB series
X = 1
FOR K = 1 TO 4
PRINT X;
X = X + K
NEXT K
END SUB DECLARE SUB RESULT ( )
CLS
CALL RESULT
END
SUB RESULT ( )
Z = 3
FOR A = 1 TO 10
PRINT (A^2)*Z
NEXT A
END SUB
Output:
1 2 5 9 Output:
3
12
21
48
DECLARE SUB Show ( )
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 DECLARE SUB Series( )
CALL Series
END
SUB Series
A=2
B=2
For ctr=1 to 2
PRINT A; B;
A= A+B
B=A+B
Next ctr
END SUB
Output:
3 2 3 4 Output:
2 2 4 6
[SLC 2066 S]
DECLARE SUB Result ( )
CALL Result
END
SUB Result
For I = 1 to 9 STEP 2
Sum=Sum +I^2
Next I
PRINT Sum
END SUB [SLC 2070 S]
DECLARE SUB Series ()
CALL Series
END
SUB Series
X = 0
FOR K = 10 TO 4 STEP -2
A = K ^2
X = X + A
NEXT K
PRINT X
END SUB
Output:
165 Output:
216
DECLARE SUB SERIES()[SQE 2074K]
CALL SERIES
END
SUB SERIES()
R=2
M=5
WHILE M>=1
PRINT R
R=R*10+2
M=M-1
WEND
END SUB [SEE 2075 S2]
DECLARE FUNCTION SQD(N)
S = 0
FOR L = 1 TO 3
READ NUM
S = S +SQD (NUM)
NEXT L
PRINT " Sum" ; S
DATA 2,4,6
END FUNCTION SQD (N)
SQD = N^2
END FUNCTION
Output:
2
22
222
2222
22222 Output:
Sum 56
DECLARE SUB SERIES()
CLS
CALL SERIES
END
SUB SERIES( )
X#=11111
FOR I= 1 TO 5
PRINT X#^2
X# = (X# - 1) / 10
NEXT I
END SUB [SLC 2069]
DELARE SUB NUMBER()
CLS
CALL NUMBER
END
SUB NUMBER
N=3
C=1
WHILE C<=5
PRINT N
N=N*10+3
C=C+1
WEND
END SUB
Output:
123454321
1234321
12321
121
1 Output:
3
33
333
3333
33333
DECLARE SUB CHECK ()
CALL CHECK
END
SUB CHECK
CLS
FOR K = 1 TO 5
FOR I = 5 TO K STEP -1
PRINT I;
NEXT I
PRINT
NEXT K
END SUB DECLARE SUB FIND(N)
N=654
CALL FIND(N)
END
SUB FIND(N)
WHILE N < > 0
R= N MOD10
P= P*10 + R
N= N \ 10
WEND
PRINT P
END SUB
Output:
54321
5432
543
54
5 Output:
456
[SEE 2071 S]
DECLARE FUNCTION test (N)
CLS
FOR Ctr = 1 TO 3
READ N
Sum = Sum + test (N)
NEXT Ctr
PRINT “The result=”; Sum
DATA 3, 2, 1
END
FUNCTION test (N)
Test = N^2
END FUNCTION
DECLARE FUNCTION CONVERSION(B)
CLS
Z=1111
ANS= CONVERSION(Z)
PRINT”THE RESULT”;ANS
END
FUNCTION CONVERSION(B)
P=0
DO WHILE B<>0
D= B MOD 10
E = D*2^P+E
B = INT(B/10)
P = P+1
LOOP
CONVERSION=E
END FUNCTION
Output:
The result = 14 Output:
THE RESULT 15
DECLARE SUB PER(P)
P=15
CALL SER(12)
END
SUB SERIES (P)
M=3
WHILE M<7
PR=M*P
PRINT PR,
M=M+2
WEND
END SUB [SEE 2073 U]
DECLARE SUB CHECK (N)
CLS
N = 1436
CALL CHECK (N)
END
SUB CHECK (N)
DO WHILE n< >0
R = N MOD 10
S = S*10+R
N = N\10
LOOP
PRINT "NOW N BECOMES"; S
END SUB
Output:
36 60 Output:
NOW N BECOMES 6341
[SQE 2075K]
DECLARE FUNCTION RESULT (N)
N = 4
PRINT RESULT (N)
END
FUNCTION RESULT (N)
FOR I = 1 TO N
T = I + 2
D = D + T
NEXT I
RESULT = D
END FUNCTION DECLARE FUNCTION TEST (N)
CLS
FOR J= 3 TO 9 STEP 2
X= TEST(J)
PRINT X
NEXT J
END
FUNCTION TEST (N)
TEST = (N^2)+ 2
END FUNCTION
Output:
18
Output:
11
27
51
83
DECLARE SUB OUTP(A$)
CLS
A$ = “COMPUTER”
CALL OUTP(A$)
END
SUB OUTP(A$)
B = LEN(A$)
C = 1
LAB:
PRINT LEFT$(A$, C)
C = C + 1
IF C <= B THEN GOTO LAB
END SUB DECLARE SUB CHK (N$())
FOR I= 1 TO 6
READ N$(I)
NEXT I
CALL CHK (N$())
DATA Patan, Pray, Ada, Cabbage, English, Samsung
END
SUB CHK (N$())
FOR I = 1 TO 6
S$=S$+MID$(N$(I)),I,1)
NEXT I
PRINT S$
END SUB
Output:
C
CO
COM
COMP
COMPU
COMPUT
COMPUTE
COMPUTER Output:
Prabin
DECLARE SUB DISPLAY(B$)
CLS
CALL DISPLAY(“101”)
END
SUB DISPLAY(B$)
FOR I=LEN(B$) TO 1 STEP-1
A$=MID$(B$,I,1)
C=VAL(A$)
D=D+C*8^P
P=P+1
NEXT I
PRINT D
END SUB DECLARE SUB RESULT (S$)
CLS
A$=”PROGRAMMER”
CALL RESULT (A$)
END
SUB RESULT (A$)
FOR C= LEN (A$) TO 1 STEP -2
X$= MID$(A$, C, 1)
PRINT X$;
NEXT C
END SUB
Output:
65 Output:
RMAGR
DECLARE SUB PRO (A AS INTEGER, B AS STRING)
N = 62
CALL PRO (N, S$)
PRINT S$
END
SUB PRO (A AS INTEGER, B AS STRING)
X = A
DO
R = X MOD 8
B = STR$ (R) + B
X = (X - R) / 8
LOOP UNTIL X = 0
END SUB DECLARE SUB SHOW (ABC$)
CLS
AB$="ZHTUOMENXSA"
CALL SHOW (AB$)
END
SUB SHOW (AB$)
Y=48
FOR I=1 TO 5
N=Y MOD 7
PRINT MID$(AB$, N, 1);
Y=Y-1
NEXT I
END SUB
Output:
76 Output:
MOUTH
DECLARE SUB RESULT ( )
CLS
CALL RESULT
END
SUB RESULT ()
W$="SCIENCE"
L=LEN (W$)
X=1: Y=3
FOR I= 1 TO L STEP 2
PRINT TAB (Y); MID$(W$, X, L)
X=X+1
L=L-2
Y=Y+1
NEXT I
END SUB DECLARE SUB PICTURE (ST$)
X$ = "SCIENCE"
CALL PICTURE(ST$)
END
SUB PICTURE(S$)
T=20
P=4
N=1
FOR A= 1 TO 4
PRINT TAB(T); MID$(ST$,P,N)
P=P-1
N=N+2
T=T-1
NEXT A
END SUB
Output:
SCIENCE
CIENC
IEN
E Output:
E
IEN
CIENC
SCIENCE
DECLARE SUB PATTERN (W$)
CLS
LET W$=”KATHMANDU”
CALL PATTERN (W$)
END
SUB PATTERN (W$)
T=5
FOR K=1 TO LEN(W$) STEP 2
PRINT TAB(T); MID$(W$,T,K)
T=T-1
NEXT K
END SUB
DECLARE SUB PATTERN(S$)
B$=”PROGRAM”
CALL PATTERN(B$)
END
SUB PATTERN(S$)
H=LEN(S$)
I=10
FOR J=1 TO H STEP 2
PRINT TAB(I); MID$(S$,J,H)
H=H-2
I=I+1
NEXT J
END SUB
Output:
M
HMA
THMAN
ATHMAND
KATHMANDU Output:
PROGRAM
ROGRA
OGR
G
[SLC 2067]
DECLARE SUB RESULT(N$)
N$ = "SCIENCE"
CALL RESULT(N$)
END
SUB RESULT (N$)
B = LEN(N$)
COUNT = 1
WHILE COUNT <= B
X$ = X$ + MID$(N$, COUNT, 1)
COUNT = COUNT + 2
WEND
PRINT X$
END SUB [SEE 2074]
DECLARE SUB Display (T$)
CLS
T$ = "COMPUTER"
CALL Display (T$)
END
SUB Display (T$)
FOR C = 1 TO LEN (T$) STEP 2
D$ = MID$ (T$, C, 1)
PRINT D$;
NEXT C
END SUB
Output:
SINE Output:
CMUE
[SLC 2065]
DECLARE SUB RESULT(A$)
A$ = "education"
CALL RESULT(A$)
END
SUB RESULT (A$)
FOR C = 1 TO LEN(A$) STEP 2
X$ = MID$(A$, C, 1)
PRINT X$
NEXT C
END SUB DECLARE SUB TEST(A$)
CLS
A$="NEPAL"
CALL TEST(A$)
END
SUB TEST(A$)
FOR I = 1 TO LEN(A$)
B$ = MID$(A$, I, 1) + B$
NEXT I
PRINT B$
END SUB
Output:
e
u
a
i
n Output:
LAPEN
DECLARE FUNCTION OUTP$(A$())
DIM A$(5)
FOR I=1 TO 5
READ A$(I)
NEXT I
DATA NETRA, NAVIN, SUSAN, GOPAL, SUNIL
PRINT OUTP$(A$())
END
FUNCTION OUTP$(A$())
SWAP A$(1),A$(2)
SWAP A$(3),A$(4)
FOR J=1 TO 5
T$=T$+MID$(A$(J),J,1)
NEXT J
OUTP$=T$
END FUNCTION DECLARE FUNCTION RE$(ST$())
DIM ST$(7)
CLS
FOR I=1 TO 7
INPUT "Enter string"; ST$(I)
NEXT I
PRINT RE$(ST$())
DATA “Prabhu”, “Alok”, “Bimal”, “Suman”, “Ishwor”, “Om”, “Nitu”
END
FUNCTION RE$(ST$()))
FOR J = 1 TO 7
VR$ = VR$ + MID$(ST$(J), I,1)
NEXT J
RE$=VR$
END FUNCTION
Output:
NEPAL Output:
PABSION
DECLARE FUNCTION answer$(x$)
CLS
Y$ = “Question”
PRINT answer$(Y$)
END
FUNCTION answer$(x$)
FOR I = LEN(x$) to 1 STEP – 4
Z$ = MID$(x$, I, 1) + Z$
NEXT i
answer$ = Z$
END FUNCTION DECLARE FUNCTION OUT$(A$( ))
DIM A$(6)
FOR A = 0 to 5
READ A$(A)
NEXT A
DATA SARITA, JEHEN, RADHIKA, ISHIKA, DILIP, BRIJESH
PRINT OUT$(A$( ))
END
FUNCTION OUT$(A$( ))
CTR = 1
FOR R = 0 TO 5
T$ = T$ + MID$ (A$(R), CTR, 1)
CTR = CTR + 1
NEXT R
OUT$ = T$
END FUNCTION
Output:
Sn Output:
SEDIPS
DECLARE FUNCTION ABC(X)
CLS
FOR I=1 TO 8
READ N
Z=ABC(N)
S=S+Z
NEXT I
PRINT S
DATA 7, 22, 11, 34, 17, 52, 26, 13
END
FUNCTION ABC(X)
IF X MOD 2 < > 0 THEN ABC=X
END FUNCTION DECLARE FUNCTION CHECK(A)
CLS
PRINT CHECK(4387)
END
FUNCTION CHECK(A)
WHILE A<>0
R=A MOD 10
IF R MOD 2=0 THEN
S=S+R
END IF
A=A\10
WEND
CHECK=S
END FUNTION
Output:
48 Output:
12
DECLARE FUNCTION CHECK (B)
A = 125
S = 0
CLS
PRINT “OUTPUT:::”;CHECK (A)
END
FUNCTION CHECK (B)
WHILE B<>0
C = B MOD 10
IF C MOD 2=1 THEN D = D + C^3
B = INT(B/10)
WEND
CHECK = D
END FUNCTION DECLARE SUB NUM( )
CLS
CALL NUM
END
SUB NUM()
A = 3
FOR I = 1 TO 5
PRINT A,
IF A MOD 2 < > 0 THEN
A = A*3+1
ELSE
A =A/2
ENDIF
NEXT I
END SUB
Output:
OUTPUT::: 126 Output:
3 10 5 16 8
DECLARE SUB RESULT(X,Y)
CALL RESULT(3,9)
END
SUB RESULT(X,Y)
FOR I = X TO Y
R=I MOD 2
IF R=1 THEN PRINT I
NEXT I
END SUB DECLARE SUB RSLT (A, B)
CALL RSLT (3, 15)
END
SUB RSLT (A, B)
FOR I = A TO B
R = I MOD 2
IF R = 0 THEN PRINT I
NEXT
END SUB
Output:
3
5
7
9 Output:
4
6
8
10
12
14
DECLARE SUB DISPLAY(X)
CLS
FOR N = 1 TO 10 STEP 3
CALL DISPLAY (N)
NEXT N
END
SUB DISPLAY (X)
IF X MOD 2 =1 THEN PRINT X;
END SUB DECLARE SUB G(A, B)
FOR X = 1 TO 4
READ P, Q
CALL G(P, Q)
NEXT X
DATA 4, 5, 8, 6, 15, 10, 17, 19
END
SUB G(A, B)
IF A < B THEN
TH = A
ELSE
TH = B
END IF
PRINT TH
END SUB
Output:
1 7 Output:
4
6
10
17
DECLARE SUB ABC(A)
FOR I = 1 TO 5
READ N
CALL ABC(N)
NEXT I
DATA 24, 15, 48, 18, 12
END
SUB ABC(N)
R = N MOD 4
R1 = N MOD 6
IF R = 0 AND R1 = 0 THEN
PRINT N
END IF
END SUB DECLARE SUB OUTPOOT()
CLS
CALL OUTPOOT
END
SUB OUTPOOT
I=1
N=10
DO
IF N MOD 2=0 THEN PRINT N
I=I+1
N=N+1
LOOP UNTIL I>9
END SUB
Output:
24
48
12 Output:
10
12
14
16
18
DECLARE FUNCTION CNT(ST$)
ST$ = “COMPUTER”
TOT = CNT(ST$)
PRINT TOT
END
FUNCTION CNT(ST$)
C = 1
DO WHILE C <= LEN(ST$)
A = ASC(MID$(ST$, C, 1)
S = S + A
C = C + 1
LOOP
CNT = S
END FUNCTION DECLARE FUNCTION PAB(S$)
CLS
R$=”Today is my computer exam”
PRINT PAB(R$)
END
FUNCTION PAB(S$)
C=1
FOR I = 1 TO LEN(S$)
A$=MID$(S$,I,1)
IF A$= “m” THEN C=C+1
NEXT I
PAB=C
END FUNCTION
Output:
623 Output:
3
DECLARE SUB TEST(A$)
A$ = “COMPUTER”
CALL TEST(A$)
END
SUB TEST(A$)
FOR I=1 TO LEN(A$)
B$=MID$(A$,I,1)
C=ASC(B$)
IF C MOD 2 =0 THEN
D$=D$+CHR$(C+32)
ELSE
D$=D$+B$
ENDIF
NEXT I
PRINT D$
END SUB DECLARE SUB DISPLAY(S$)
A$=”MAAF”
DISPLAY A$
END
SUB DISPLAY(S$)
L=LEN(S$)
FOR I=L TO 1 STEP -1
VER$=MID$(S$, I, 1)
IF I MOD 2 =1 THEN
CON$=CON$+LCASE$(VER$)
ELSE
CON$=CON$+UCASE$(VER$)
END IF
NEXT
PRINT CON$
END SUB
Output:
COMpUtEr Output:
FaAm
DECLARE FUNCTION VCOUNT(A$)
X$=”SCHOOL”
Y$=” INSTITUTE”
IF VCOUNT(S$)>VCOUNT(Y$) THEN PRINT X$ ELSE PRINT Y$
END
FUNCTION VCOUNT(A$)
N$=UCASE$(A$)
FOR X= 1 TO LEN(N$)
C$=MID$(N$,I,1)
IF C$=”A” OR C$=”E” OR C$=”I” OR C$=”O” OR C$=”U” THEN V=V+1
END IF
NEXT X
VCOUNT=V
END FUNCTION DECLARE FUNCTION CONV$(D)
CLS
D = 509
PRINT CONV$(D)
END
FUNCTION CONV$(D)
WHILE D<>0
R = D MOD 16
IF R < 10 THEN
S$ = STR$(R) +S$
ELSE
S$ = CHR$(R+55) +S$
END IF
D = D\16
WEND
CONV$ = S$
END FUNCTION
Output:
INSTITUTE Output:
1FD
[SEE 2075 U] [SEE 2074 U]
DECLARE FUNCTION SUM ( a )
a = 9
PRINT SUM ( a )
END
FUNCTION SUM ( a )
FOR K = 1 to a
IF K MOD 2 = 0 THEN
S = S + K
END IF
NEXT K
SUM = S
END FUNCTION
DECLARE SUB REMINDER (R)
FOR I = 1 TO 4
READ X
CALL REMINDER (X)
NEXT I
DATA 56, 28, 8, 48
END
SUB REMINDER (R)
R1 = R MOD 4
R2 = R MOD 3 IF
R1 = 0 AND R2<> 0 THEN
PRINT R
END IF
END SUB
Output:
20 Output:
56
28
8
Debugging [35]
DECLARE SUB correct( )
CLS
REM to calculate the area of rectangle
CALL SUB correct
END
SUB Correct
INPUT “enter length”;L
INPUT “enter breadth”;B
A= LENGTH* BREADTH
PRINT “area of rectangle=”;Area
SUB END DECLARE SUB correct( )
CLS
REM to calculate the area of rectangle
CALL correct
END
SUB Correct
INPUT “enter length”;L
INPUT “enter breadth”;B
A= L*B
PRINT “area of rectangle=”; A
END SUB
Rem program to find the cube of the cube of a given number
DECLARE FUNCTION CUBE(R)
ENTER R
DISPLAY CUBE(R)
END
FUNCTION CUBE(R)
S=R^3
PRINT S
COMPLETE Rem program to find the cube of the cube of a given number
DECLARE FUNCTION CUBE(R)
INPUT R
PRINT CUBE(R)
END
FUNCTION CUBE(R)
S=R^3
CUBE = S
END FUNCTION
[SLC 2071]
DECLARE SUB CUBE(N)
CLS
FOR I = 1 TO 5
READ
CALL CUBE(No)
NEXT X
DATA 3, 5, 2, 6, 4
END
SUB CUBE( )
DISPLAY N^3
END SUB DECLARE SUB CUBE(N)
CLS
FOR I = 1 TO 5
READ No
CALL CUBE(No)
NEXT I
DATA 3, 5, 2, 6, 4
END
SUB CUBE(N)
PRINT N^3
END SUB
[SLC 2065]
DECLARE FUNCTION SUM(a,b)
REM Program to sum given two numbers
Input ”Enter first number”; x
Input “Enter second number; y
PRINT SUM(a,b)
END
FUNCTION SUM(x,y)
SUM=a+b
END [SLC 2065]
DECLARE FUNCTION SUM(a,b)
REM Program to sum given two numbers
Input ”Enter first number”; x
Input “Enter second number”; y
PRINT SUM(x, y)
END
FUNCTION SUM(a, b)
SUM=a+b
END FUNCTION
[SLC 2072]
FUNCTION SUM (m,n)
Rem to print sum of two numbers
a= 6
b= 7
DISPLAY SUM (a, b)
END
FUNCTION SUM (m,n)
S = m +n
S = SUM
END SUM [SLC 2072]
DECLARE FUNCTION SUM (m,n)
Rem to print sum of two numbers
a= 6
b= 7
PRINT SUM (a, b)
END
FUNCTION SUM (m,n)
S = m +n
SUM = S
END FUNCTION
[SLC 2068]
CREATE FUNCTION Square(A)
Rem to print square of a number
CLS
Get “a number”; A
CALL square(A)
END
FUNCTION square(A)
Ans=A^2
Square=Ans
END Square(A) [SLC 2068]
DECLARE FUNCTION Square(A)
Rem to print square of a number
CLS
INPUT “a number”; A
PRINT square(A)
END
FUNCTION square(A)
Ans=A^2
Square=Ans
END FUNCTION
DECLARE FUNCTION AREA (X)
CLS
REM TO FIND THE AREA OF CIRCLE
INPUT “ENTER THE VALUE OF RADIUS”;R
CALL AREA (R)
END
FUNCTION AREA (X)
AR= (22/7)* R^2
AR=AREA
FUNCTION END DECLARE FUNCTION AREA (X)
CLS
REM TO FIND THE AREA OF CIRCLE
INPUT “ENTER THE VALUE OF RADIUS”;R
PRINT AREA (R)
END
FUNCTION AREA (X)
AR= (22/7)* X^2
AREA=AR
END FUNCTION
[SLC 2064] [SLC 2067 S] [SLC 2071 S]
DECLARE SUB Series( )
CLS
EXECUTE Series
END
SUB Series( )
REM program to generate 3 3 4 9 15 upto 20th terms.
A=3
B=3
FOR ctr= 10 to 1
DISPLAY A;B;
A=A+B
B=A+B
NEXT ctr
END Series( ) DECLARE SUB Series( )
CLS
CALL Series
END
SUB Series()
REM program to generate 3 3 4 9 15 upto 20th terms.
A=3
B=3
FOR ctr= 10 to 1 STEP-1
PRINT A;B;
A=A+B
B=A+B
NEXT ctr
END SUB
[SLC 2066]
DECLARE SUB Fibonic ()
REM *Fibonic series*
CALL SUB Fibonic
END
SUB Fibonic
A=1
B=1
FOR x=1 to 10
DISPLAY a;
a=a+b
b=a+b
END Fibonic DECLARE SUB Fibonic ()
REM *Fibonic series*
CALL Fibonic
END
SUB Fibonic
A=1
B=1
FOR x=1 to 10
PRINT a; b;
a=a+b
b=a+b
NEXT x
END SUB
[SEE 2065 S]
DECLARE SUB Series()
CLS
EXECUTE Series
END
SUB Series
A=2
B=2
FOR ctr= 1 to 5
DISPLAY A;B;
A=A+B
B=A+B
LOOP ctr
END Series() DECLARE SUB Series( )
CLS
CALL Series
END
SUB Series
A=2
B=2
FOR ctr= 1 to 5
PRINT A;B;
A=A+B
B=A+B
NEXT ctr
END SUB
[SEE 2073 U]
DECLARE SUB Series ( )
CLS
EXECUTE Series
END
SUB Series
REM Program to print 4 4 8 12 20 ....... 20th terms
X = 4
Y = 4
FOR ctr = 10 To 1
DISPLAY X; Y;
X = X+Y
Y = X+ Y
Next ctr
End Series DECLARE SUB Series ( )
CLS
CALL Series
END
SUB Series ( )
REM program to generate 4 4 8 12 20 …20th term
X=4
Y=4
For ctr = 10 TO 1 STEP -1
PRINT C ; Y;
X = X + Y
X = X + Y
NEXT ctr
END SUB
[SLC 2070]
DECLARE SUB Series( )
CLS
EXECUTE Series
END
SUB Series
REM to generate 2 2 4 6 10….. upto 10th term
P=2
Q=2
FOR Ctr=1 TO 5
DISPLAY P,Q,
P=P+Q
Q=P+Q
WEND
END Series() [SLC 2070]
DECLARE SUB Series(.)
CLS
CALL Series
END
SUB Series
REM to generate 2 2 4 6 10….. upto 10th term
P=2
Q=2
FOR ctr=1 TO 5
PRINT P,Q,
P=P+Q
Q=P+Q
NEXT ctr
END SUB
[SEE 2073]
DECLARE SUB SUM (N)
INPUT "Any Number"; N
PRINT SUM (N)
END
SUB SUM (N)
S = 0
WHILE N = 0
R = R MOD 10
S = S+R
N = N/10
WEND
PRINT "Sum of digits"; s
END
[SEE 2073]
DECLARE SUB SUM (N)
INPUT "Any Number"; N
CALL SUM (N)
END
SUB SUM (N)
S = 0
WHILE N < > 0
R = N MOD 10
S = S+R
N = N\10
WEND
PRINT "Sum of digits"; s
END SUB
REM To find the sum of even digits of multi digits number
DECLARE FUNCTION SUM (N)
CLS
INPUT “ENTER MULTI-DIGITS NUMBER ”; N
PRINT “SUM = ” ; SUM(N)
END
FUNCTION SUM(N)
WHILE N=0
R= N MOD 10
IF R MOD 2 = 1 THEN S=S+R
N = N / 10
WEND
SUM (N) =S
END FUNCTION
REM To find the sum of even digits of multi digits number
DECLARE FUNCTION SUM (N)
CLS
INPUT “ENTER MULTI-DIGITS NUMBER ”; N
PRINT “SUM = ” ; SUM(N)
END
FUNCTION SUM(N)
WHILE N < > 0
R= N MOD 10
IF R MOD 2 = 0 THEN S=S+R
N = N \ 10
WEND
SUM =S
END FUNCTION
[MM 2076]
REM To check the input no. is perfect square or not
DECLARE FUNCTION chk$ (a)
CLS
INPUT “Enter the number :”; a
CALL chk$ (a)
END
FUNCTION chk$(a)
m=SQUARE (a)
n=INT (m)
IF m=a THEN
c$=”Perfect Square”
ELSE
c$=”Not Perfect Square”
END IF
C$=chk$
END FUNCTION REM To check the input no. is perfect square or not
DECLARE FUNCTION chk$ (a)
CLS
INPUT “Enter the number :”; a
PRINT chk$ (a)
END
FUNCTION chk$(a)
m=SQR (a)
n=INT (m)
IF m=n THEN
c$=”Perfect Square”
ELSE
c$=”Not Perfect Square”
END IF
chk$ = c$
END FUNCTION
[SEE 2074]
REM TO find the factorial of a given number.
DECLARE FUNCTION FACTO (N$)
CLS
INPUT "Enter a number", X
PRINT "The Factorial is: ", FACTO (N)
END
FUNCTION FACTO (N)
F = 1
WHILE N = 0
F = F*N
N = N - 1
WEND
F = FACTO
END FUNCTION REM TO find the factorial of a given number.
DECLARE FUNCTION FACTO (N)
CLS
INPUT "Enter a number", X
PRINT "The Factorial is: ", FACTO (X)
END
FUNCTION FACTO (N)
F = 1
WHILE N < > 0
F = F*N
N = N - 1
WEND
FACTO = F
END FUNCTION
DECLARE SUB FACT (N)
REM PRINT FACTORS OF INPUT NUMBER WITH SUB PROCEDURE
INPUT “ENTER NUMBER:”, A
CALL FACT(N)
END
SUB FACT (N)
FOR K=1 TO N
IF N MOD K =1 THEN
PRINT K
IF END
END FUNCTION DECLARE SUB FACT (N)
REM PRINT FACTORS OF INPUT NUMBER WITH SUB PROCEDURE
INPUT “ENTER NUMBER:”, A
CALL FACT(A)
END
SUB FACT (N)
FOR K=1 TO N
IF N MOD K =0 THEN
PRINT K
END IF
END SUB
REM TO FIND LONGEST NAME
DECLARE FUNCTION LONGETS$(A$, B$, C$)
INPUT A$, B$, C$
PRINT LONGEST(A$, B$, C$)
END
FUNCTION LONGEST$(A$, B$, C$)
A = LEN$(A$)
B = LEN(B$)
C = LEN(C$)
IF A > B OR A > C THEN
A$ = L$
ELSEIF B > A OR B > C THEN
L$ = B$
ELSE
L$ = C$
END IF
LONGEST$(A$, B$, C$) = L$
FUNCTION END REM TO FIND LONGEST NAME
DECLARE FUNCTION LONGETS$(A$, B$, C$)
INPUT A$, B$, C$
PRINT LONGEST$(A$, B$, C$)
END
FUNCTION LONGEST$(A$, B$, C$)
A = LEN(A$)
B = LEN(B$)
C = LEN(C$)
IF A > B AND A > C THEN
L$ =A$
ELSEIF B > A AND B > C THEN
L$ = B$
ELSE
L$ = C$
END IF
LONGEST$ = L$
END FUNCTION
[SEE 2075]
DECLARE FUNCTION reverse$ (N$)
INPUT "Any String"; N$
X$ = reverse$(N$)
PRINT N$
END
FUNCTION reverse (N$)
L = LEN$(N$)
FOR X = L To 1 STEP - 1
A$ = MID$ (N$,X,1)
B$ = B$+A$
NEXT X
B$ = reverse$ (N$)
END FUNCTION DECLARE FUNCTION reverse$ (N$)
INPUT "Any String"; N$
X$ = reverse$(N$)
PRINT X$
END
FUNCTION reverse$ (N$)
L = LEN (N$)
FOR X = L To 1 STEP - 1
A$ = MID$ (N$,X,1)
B$ = B$+A$
NEXT X
reverse$ =B$
END FUNCTION
[SLC 2069]
Rem program to reverse the string or word
DECLARE SUB REV(W$)
CLS
INPUT “Enter a word”;W$
CALL REV(W$)
END
SUB REV(W$)
FOR I=LEN(W$) to 1 step -1
C$=LEFT$(W$,I,1)
S$=D$+1
LOOP
PRINT “Reverse string is:”; D$
CLOSE SUB
[SLC 2069]
Rem program to reverse the string or word
DECLARE SUB REV(W$)
CLS
INPUT “Enter a word”;W$
CALL REV(W$)
END
SUB REV(W$)
FOR I=LEN(W$) to 1 step -1
C$=MID$(W$,I,1)
S$=S$+C$
NEXT I
PRINT “Reverse string is:”; S$
END SUB
[MFT 2076]
REM program to display reverse of supplied string
DECLARE SUB REVE (C$)
CLS
INPUT “Enter the value”; C$
FOLLOW REVE (C$)
END
SUB REVE(C$)
FOR J = 1 to LEN(C$)
B$ = MID$(C$, 1, J)
A$=A$+B$
LOOP J
PRINT A$
END SUB
REM program to display reverse of supplied string
DECLARE SUB REVE (C$)
CLS
INPUT “Enter the value”; C$
CALL REVE (C$)
END
SUB REVE(C$)
FOR J = LEN(C$) TO 1 STEP -1
B$ = MID$(C$, J, 1)
A$=A$+B$
NEXT J
PRINT A$
END SUB
[PMT 2075]
DECLARE FUNCTION REV$ (ST$)
CLS
INPUT “Enter string”, S$
LET R$= REV$(st$)
PRINT "The reverse string is :"; R$
END
FUNCTION REV$(ST$)
FOR I = LEN(ST$) TO 1
RV$= RV$+ MID$(ST$, 1, I)
NEXT I
RV$=REV$
END FUNCTION
DECLARE FUNCTION REV$ (ST$)
CLS
INPUT “Enter string”, S$
LET R$= REV$(S$)
PRINT "The reverse string is :"; R$
END
FUNCTION REV$(ST$)
FOR I = LEN(ST$) TO 1 STEP - 1
RV$= RV$+ MID$(ST$, I, 1)
NEXT I
REV$=RV$
END FUNCTION
REM do display the reverse of the supplied number
DECLARE FUNCTION rev(n)
CLS
INPUT n
PRINT rev(n)
END
FUNCTION rev(n)
WHILE n = 0
R = n MOD 10
D$ = STR$(R) + D$
n = n / 10
WEND
Rev = ASC(D$)
END FUNCTION REM do display the reverse of the supplied number
DECLARE FUNCTION rev(n)
CLS
INPUT n
PRINT rev(n)
END
FUNCTION rev(n)
WHILE n < > 0
R = n MOD 10
D$ = D$ + STR$(R)
n = n \ 10
WEND
Rev = VAL(D$)
END FUNCTION
REM to print odd numbers from 32 to 12
DECLARE SUB SHOW ( )
CLS
CALL SHOW ( )
END
SUB SHOW ( )
N = 12
WHILE N <= 32
IF N MOD 2 = 0 THEN PRINT N;
N = N-1
NEXT N
END SUB REM to print odd numbers from 32 to 12
DECLARE SUB SHOW ( )
CLS
CALL SHOW
END
SUB SHOW ( )
N = 32
WHILE N >= 12
IF N MOD 2 = 0 THEN PRINT N;
N = N-1
WEND
END SUB
DECLARE SUB CHECK(N)
CLS
INPUT”ENTER A NUMBER”;NUM
C=CHECK(N)
END
SUB CHECK(A)
FOR I=2 TO N/2
IF N MOD 1=0 THEN
C=C+2
END IF
WEND
IF C>0 THEN
PRINT”IT IS COMPOSITE”
ELSE
PRINT”IT IS PRIME”
END IF
END SUB
DECLARE SUB CHECK(N)
CLS
INPUT”ENTER A NUMBER”;NUM
CALL CHECK(NUM)
END
SUB CHECK(N)
FOR I=2 TO N/2
IF N MOD I=0 THEN
C=C+1
END IF
NEXT I
IF C>0 THEN
PRINT”IT IS COMPOSITE”
ELSE
PRINT”IT IS PRIME”
END IF
END SUB
[SLC 2067]
REM to display all the records from sequential data file ABC.DAT
OPEN “ABC.DAT” FOR OUTPUT AS # 1
DO WHILE NOT EOF(“ABC.DAT”)
INPUT # 1,N$,A
PRINT N$,A
CLOSE 1
END
[SLC 2067]
REM to display all the records from sequential data file ABC.DAT
OPEN “ABC.DAT” FOR INPUT AS # 1
DO WHILE NOT EOF(1)
INPUT # 1,N$,A
PRINT N$, A
LOOP
CLOSE # 1
END
[SLC 2068 S]
Rem to display the contents of a data file.
OPEN “Marks.dat” FOR OUTPUT AS #1
CLS
WHILE EOF(1)
INPUT #1, Name$, Age, Add$
DISPLAY Name$, Age, Add$
WEND
CLOSE 1
END [SLC 2068 S]
Rem to display the contents of a data file.
OPEN “Marks.dat” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, Name$, Age, Add$
PRINT Name$, Age, Add$
WEND
CLOSE #1
END
[SLC 2069]
REM display Records of students From Data File
OPEN “STDREC.DAT” FOR INP AS #1
PRINT “ROLL”,”NAME”,”ADDRESS”,”CLASS”,”SECTION”
DO WHILE NOT EOF
INPUT #1,RN,N$,AD$,CL,S$
PRINT RN,N$,AD$,CL,S$
NEXT
CLOSE #1
END [SLC 2069]
REM display Records of students From Data File
OPEN “STDREC.DAT” FOR INPUT AS #1
PRINT “ROLL”, “NAME”, “ADDRESS”, “CLASS”, “SECTION”
DO WHILE NOT EOF(1)
INPUT #1, RN, N$, AD$, CL, S$
PRINT RN, N$, AD$, CL, S$
LOOP
CLOSE #1
END
[SLC 2066 S]
REM To store Name, post and salary
OPEN “EMP.DOC” FOR OUT AS #1
INPUT” Enter name”;N
INPUT” Enter post”;P$
INPUT “Enter salary”;S
WRITE #2, N$,P$, S
CLOSE #1
END [SLC 2066 S]
REM To store Name, post and salary
OPEN “EMP.DOC” FOR OUTPUT AS #1
INPUT” Enter name”;N$
INPUT” Enter post”;P$
INPUT “Enter salary”;S
WRITE #1, N$, P$, S
CLOSE #1
END
REM COPY THE DATA OF “SRC.INF” TO “DEST.INF”
OPEN “SRC.INF” FOR INPUT AS #1
OPEN “DEST.INF” FOR OUTPUT AS #2
CLS
WHILE NOT EOF( )
INPUT #2, NM$, RN, AGE
WRITE #1, NM$, RN, AGE
CLOSE #1, #2
END REM COPY THE DATA OF “SRC.INF” TO “DEST.INF”
OPEN “SRC.INF” FOR INPUT AS #1
OPEN “DEST.INF” FOR OUTPUT AS #2
CLS
WHILE NOT EOF( 1)
INPUT #1, NM$, RN, AGE
WRITE #2, NM$, RN, AGE
WEND
CLOSE #1, #2
END
[SLC 2070 S]
OPEN "STUDENT.DAT" FOR APPEND AS 1#
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE$
WRITE #1, N$, ADD$, AGE
END# 1
STOP OPEN "STUDENT.DAT" FOR APPEND AS #1
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE
WRITE #1, N$, ADD$, AGE
CLOSE # 1
END
[SEE 2075 U]
REM program to read data from the data file.
OPEN “STD.DAT” FOR OUTPUT AS #1
CLS
WHILE NOT EOF(#1)
WRITE#1, N$, R, C, P
PRINT N$, R, C, P
WEND
CLOSE “STD.DAT”
END REM program to read data from the data file.
OPEN “STD.DAT” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, N$, R, C, P
PRINT N$, R, C, P
WEND
CLOSE #1
END
[SEE 2074 U]
Rem To print only class 10 record from "student.dat" CLS
OPEN "I",#2, "Student.Dat"
WHILE NOT EOF (#2)
WRITE#2, N$,C,R
IF C=10 THEN
DISPLAY N$,C,R
END IF
NEXT
CLOSE #2
END Rem To print only class 10 record from “student.dat” CLS
OPEN “I” , #2 , “Student.Dat”
WHILE NOT EOF (2)
INPUT #2, N$, C, R
IF C=10 THEN
PRINT N$, C, R
END IF
WEND
CLOSE #2 END
[SQE 2075K]
REM to copy from old file to new file
OPEN "info.dat" for INPUT AS #1
OPEN "temp.dat" for OUTPUT AS #2
DO UNTIL EOF(1)
INPUT #2, n$, p$, d$, s
WRITE #1, n$, p$, d$, s
WEND
CLOSE #2, #2
END REM to copy from old file to new file
OPEN "info.dat" for INPUT AS #1
OPEN "temp.dat" for OUTPUT AS #2
DO UNTIL EOF(1)
INPUT #1, n$, p$, d$, s
WRITE #2, n$, p$, d$, s
LOOP
CLOSE #1, #2
END
[SQE 2074K]
REM to print only male record on the printer from the data file.
OPEN "EMP.DAT" FOR OUTPUT AS #1
DO
INPUT #4, N$, A%, S$
SELECT CASE S
CASE MALE
PRINT N$, A%, S$
END SELECT
LOOP UNTIL EOF(1)
STOP #1
END REM to print only male record on the printer from the data file.
OPEN "EMP.DAT" FOR INPUT AS #1
DO
INPUT #1, N$, A%, S$
SELECT CASE S$
CASE "MALE"
PRINT N$, A%, S$
END SELECT
LOOP UNTIL EOF(1)
CLOSE #1
Analytical Questions [40]
DECLARE SUB TEST(A, B, C)
LET X=4
LET Y=7
LET Z=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/3
PRINT SUM
END SUB
i) What happens if CALL TEST(X, Y, Z) is replaced by CALL TEST(A, B, C)
Ans: If CALL TEST(X, Y, Z) is replaced by CALL TEST(A, B, C) then the output will be:
5
4 7 12
ii) List the formal and real parameters used in the above program.
Ans: Formal Parameters = A, B, C
Real Parameters = X, Y, Z
DECLARE SUB question (a, b, c)
x=10 : y=20 : z=15
CALL question (x, y, z)
END
SUB question (a, b, c)
a=a+10
b= b + a
c=a +b
PRINT a, b, c
END SUB
i. Write actual and formal parameter used in the program.
Ans: Actual parameter = x, y, z
Formal parameter = a, b, c
ii. What would be its output if x=1, y=2,z=3?
Ans: The output will be:
11 13 24
DECLARE SUB SEQUENCE (A,B,C)
CLS
X=10
Y=20
Z=30
CALL SEQUENCE (X,Y,Z)
END
SUB SEQUENCE (C,B,A)
PRINT A,B,C
END SUB
i. List the formal parameters and actual parameters used in the above program.
Ans: Formal parameter = C, B, A
Actual parameter = X, Y, Z
ii. Will the above program execute if the position of parameter is to be changed? If ‘yes’ then which sequence of number list will it print either 10,20,30 or 30,20,10?
Ans: it will print 30, 20, 10
[SEE 2075 S2]
DECLARE SUB TRIM (W$)
CLS
INPUT "Enter word" ; WO$
CALL TRIM (WO$)
END
SUB TRIM (WO$)
FOR I = 1 TO LEN (W$)
PRINT LEFT$ (W$, I)
NEXT I
END SUB
i. What will be the output if input string is "SEE" in the above program?
Output
S
SE
SEE
ii. List the real parameter used in the above program.
Ans: Real parameter is WO$
DECLARE FUNCTION ADD(N)
CLS
FOR CNT= 1 TO 3
READ NUM
PRINT ADD (NUM)
NEXT CNT
DATA 8, 7, 3
END
FUNCTION ADD(N)
S=0
FOR G=1 TO N
S=S+G
NEXT G
ADD=S
END FUNCTION
i. Name the actual and formal parameter used in above program.
Ans: Actual parameter = NUM
Formal parameter = N
ii. What is the value of NUM when the value of CNT is 2?
Ans: The value of NUM will be 7 when the value of CNT is 2.
[SQE 2075K]
DECLARE SUB SERIES(A, R, N)
CLS
INPUT "ENTER FIRST TERM"; X
INPUT "NUMBER OF TERMS TO BE GENERATED:"; Z
CALL SERIES (X,Y,Z)
END
SUB SERIES (A, R, N)
FOR I = 1 TO N
PRINT A
A=A*R
NEXT
END SUB
a. What will be the output if the user input 3, 2 and 4 for variables X, Y and Z variables?
Ans: The output will be
3
6
12
24
b. What type of parameter X, Y and Z are?
Ans: X, Y and Z are actual parameters.
[SLC 2069]
DECLARE SUB EXAM (N$)
INPUT "Enter Word", WO$
CALL EXAM (WO$)
END
SUB EXAM(N$)
FOR I=1 TO LEN (N$)
PRINT RIGHT$(N$,1)
NEXT I
END SUB
i. Write the names of two built in functions used in the program.
Ans: The names of two built in functions are LEN and RIGHT$
ii. List the real parameter and formal parameter in the program.
Ans: The real parameter is WO$ and formal parameter is N$
DECLARE FUNCTION NUM(N)
N=14
PRINT NUM(N)
END
FUNCTION NUM(N)
WHILE N<>0
R=N MOD 2
S=S+R*10^P
P=P+1
N=N\2
WEND
NUM=S
END FUNCTION
i. List the local variable used in the function procedure.
Ans: The local variables are N, R, S and P
ii. What will be the output if the program?
Ans: The output is: 1110
DECLARE SUB SERIES(A, B)
DECLARE FUNCTION SUM(P,Q)
COMMON SHARED N
INPUT “Enter First Term”;X
INPUT “Enter Second Term”;Y
INPUT “Enter Number of Terms to be generated”; N
CALL SERIES(X, Y)
END
SUB SERIES (A, B)
FOR I = 1 TO N
PRINT A
A=SUM(A,B)
NEXT I
END SUB
FUNCTION SUM (P,Q)
SUM=P+Q
END FUNCTION
i. What will the output if X=10, Y=8 and N=5.
The output is
10
18
26
34
42
ii. List out the local variables and global variable in the above program.
Ans: Local variables = A, B, I, P and Q Global variables = X, Y and N
[SLC 2066]
DECLARE FUNCTION Num(N)
INPUT N
S=Num(N)
PRINT S
END
FUNCTION Num(N)
X=Int(17/N)
Y=15 MOD N
Num=X +Y
END FUNCTION
i. Write the name of the function used in the above program.
Ans: The name of the function is Num.
ii. List out the mathematical function (Library function) used in the above program.
Ans: The library function is Int( )
[SLC 2065]
DECLARE FUNCTION xyz(N)
FOR I = 1 TO 5
READ N
Z=xyz(N)
S=S+Z
NEXT I
PRINT S
DATA 10,13,15,4,6
END
FUNCTION xyz(N)
IF N MOD 2=0 THEN xyz=N
END FUNCTION
a) What is the name of the function used in the above program?
Ans: The name of the function is xyz
b) How many times the function will be called in the above program?
Ans: The function will be called 5 times.
[SLC 2065 S]
DECLARE FUNCTION Diff(A,B)
CLS
INPUT “Enter first number”;A
INPUT “Enter second number”;B
PRINT “The difference of the two number=”;Diff(A,B)
END
FUNCTION Diff(A,B)
D=A-B
Diff=D
END FUNCTION
i. What will be the output of the program if the user enters 200 as the first number and 100 as the second number.
Ans: The output is:
The difference of the two number=100
ii. Will the program run if the first line (i.e. DECLARE…..) is deleted?
Ans: Yes, the program will run if the first line (i.e. DECLARE…) is deleted.
[SEE 2073]
DECLARE FUNCTION Diff (A, B)
CLS
INPUT "Enter first number" ; A
INPUT "Enter second number" ; B
PRINT "The difference" ; Diff (A, B)
END
FUNCTION Diff (A, B)
difference = A - B
Diff = difference
END FUNCTION.
List all the numeric variables used in the above program.
Ans: The numeric variables are A, B and difference.
List the local variables used in the above program.
Ans: The local variables are A, B and difference
[SEE 2067 S]
DECLARE FUNCTION Prod(A,B)
CLS
INPUT “Enter first number:”;A
INPUT “Enter second number:”;B
PRINT “the product of two number=”;Prod(A,B)
END
FUNCTION Prod(A,B)
P=A*B
Prod=P
END FUNCTION
a) List all the numerical variables used in the program.
The numerical variables are A, B and P
b) List all the local variables used in the program.
The local variable is P
[SEE 2073 U]
DECLARE FUNCTION SUM (A, B)
INPUT A
INPUT B
X = SUM (A, B)
PRINT X
END
FUNCTION SUM (A, B)
S = A+B
SUM = S
END FUNCTION.
a) Write the name of local variable used in the above FUNCTION procedure.
Local Variable: S
b) Write the Mathematical operator and Relation operator used in above program.
Mathematical Operator : +
Relational Operator : =
[SLC 2072]
DECLARE FUNCTION Prod (N)
INPUT "Any Number"; N
X = Prod (N)
PRINT x
END
FUNCTION Prod (N)
F= 1
FOR K = 1 TO N
F = F * K
NEXT K
Prod = F
END FUNCTION
Write the name of the user defined function used in above program.
Ans: The name of the user defined function used in above program is Prod.
Name the loop in above program?
Ans: The name of loop is FOR….NEXT loop.
[SLC 2069 S]
DECLARE FUNCTION CHK$(N)
N=57
PRINT “The number is”; CHK$(N)
END
FUNCTION CHK$(N)
FOR I = 1 TO N
IF N MOD I = 0 THEN C=C+1
NEXT I
IF C>2 THEN
CHK$=”Composite”
ELSE
CHK$=”Prime”
END IF
END FUNCTION
i. Will the above program execute if “DECLARE FUNCTION….” is deleted.
Ans: Yes, the program will run if the first line (i.e. DECLARE…) is deleted.
ii. Why $ sign is used in the name of the above function.
Ans: $ sign is used in the name of the above function because the function returns string value.
[SQE 2074K]
DECLARE SUB PATTRA (N)
N = 7
CALL PATTRA(N)
END
SUB PATTRA(N)
FOR I = 1 to 5
PRINT N
IF N MOD 2 = 1 THEN
N = (N*2) + 1
ELSE
N = N / 2
END IF
NEXT I
END SUB
a) Write the output of the above program?
Ans: The output is:
7
15
31
63
127
b) Write down the function of MOD in the above program.
Ans: The function of MOD operator is to find the remainder.
[SLC 2068]
Declare function count(N$)
Input “Enter a word”; R$
C= Count(R$)
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
i) List any two library functions used in the above program.
Ans: Any two library functions are LEN( ) and MID$( ).
ii) Write the use of variable ‘C’ inline 3 [i.e. C=Count(R$)] given in the above program.
Ans: The use of variable ‘C’ is to store the value returned by the function count.
[PMT 2075]
DECLARE SUB OT (N$)
N$ = "Computer Science"
CALL OT(N$)
END
SUB OT (N$)
B = LEN(N$)
c = 1
WHILE c <= B
m$ = MID$(N$, c, 1)
PRINT m$;
c = c + 2
WEND
END SUB
a. What is the value of B in the above program?
Ans: The value of B is 16 in the above program.
b. How many parameters are used in the above sub procedure?
Ans: Only one parameter is used in the above program.
[SLC 2066 S]
DECLARE FUNCTION COUNT(A$)
Input “Enter a word”; W$
END
Function Count(A$)
B=LEN(A$)
C$=UCASE$(A$)
FOR I=1 TO B
E$=MID$(C$,I,1)
IF E$=”A” OR E$=”E” OR E$=”I” OR E$=”O” OR E$=”U” THEN C=C+1
END IF
NEXT I
COUNT=C
END FUNCTION
i. List the string Library functions used in the above program.
Ans: The string Library functions used in the above program are LEN( ), UCASE$( ) and MID$( ).
ii. Write down the missing statements in the main module to execute the program.
Ans: The missing statements in the main module to execute the program is PRINT COUNT(W$)
[SLC 2071]
DECLARE SUB Stde(N$U)
FOR Loop = 1 TO 5
READ NM$(Loop)
NEXT Loop
DATA RAMA, PRATIMA, PRASANT
DATA NISHA, RUDHRA
CALL Stde(NM$U)
END
SUB Stde(N$U)
PRINT “Name starting from P”
FOR J = 1 TO 5
C$=MID$(N$,(J),1,1)
IF C$=”P” THEN
PRINT N$(J)
END IF
NEXT J
END SUB
i. List the library function used in the above program.
Ans: The library function used in the above program is MID$( ).
ii. List the conditional statement used in the above program.
Ans: The conditional statement used in the above program is IF….THEN (i.e. IF C$ = “P” THEN).
[SLC 2068 S]
DECLARE SUB ABC(X,Y,Z)
FOR P=1 TO 3
READ A,B,C
CALL ABC(A,B,C)
NEXT P
DATA 5,4,3,2,1,6,7,8,4
END
SUB ABC(X,Y,Z)
T=X+Y+Z
IF T MOD 2 = 0 THEN
PRINT T
END IF
END SUB
i. List any two variables used in the above program.
Ans: Any two variables used in the above program are X and Y
ii. How many times SUB-procedure will be called when program is executed?
Ans: The SUB procedure will be called 3 times.
[SLC 2071 S]
DECLARE FUNCTION JPT (N)
FOR ctr = 1 TO 6
READ N
J = JPT (N)
Sum = Sum + J
NEXT ctr
PRINT Sum
DATA 10, 20, 30, 40, 50, 60
END
FUNCTION JPT (N)
IF N MOD 2 = 0 THEN JPT = N
END FUNCTION
a) What is name to the function used in the above program?
Ans: The name of the function used in the above program is JPT
b) How many times the function will be executed in the above program?
Ans: The function will be executed six times.
DECLARE FUNCTION B(N)
LET N = 12345
PRINT "Sum of Digits :"; B(N)
END
FUNCTION B(N)
WHILE N <> 0
R = N MOD 10
C = C+R
N = INT(N/10)
WEND
B = C
END FNCITON
i. Write the variables used in the program with their type.
Ans: Numeric variables = N, R and C
ii. List out the different types of operators with their type used in the program.
Ans: Arithmetic Operator = MOD, + and / : Relational Operator = < > and =
DECLARE SUB WORD (N$)
N$="PABSON”
CALL WORD (N$)
END
SUB WORD (N$)
B=LEN (N$)
C=1
WHILE C < B
M$=MID$(N$, C, 1)
PRINT M$
C=C+2
WEND
END SUB
i) List the string and numeric variables used in the program.
Ans: String variables = N$ and M$
Numeric variables = C and B
ii) What is the value of B in the above program?
Ans: The value of B = 6
DECLARE SUB SUM (N)
N = 5
CALL SUM (N)
END
SUB SUM (N)
FOR X = 1 TO N
S = S + X
NEXT X
PRINT S
END SUB
In the above program how many times does the FOR ........ NEXT loop executes ?
The FOR … NEXT loop executes 5 times.
Write the name of the procedure used in the above program.
The name of the procedure used in the above program is SUM.
DECLARE FUNCTION CUBE(T,R)
N=15
S=CUBE (2,4)
PRINT “CUBE=”; S
END
FUNCTION CUBE(P, M)
CUBE = P^3
N = 5 * 2
END FUNCTION
i. How many parameters are used in above program?
Ans: One parameter is used.
ii. List two mathematical operators used in the above program.
Ans: Any two mathematical operators are ^ and *.
[SEE 2074 U]
DECLARE FUNCTION TEST (X)
X = 100
Z = TEST (X)
PRINT Z
END
FUNCTION TEST (X)
FOR I = 1 TO X
S = S +I
NEXT I
TEST = S
END FUNCTION.
How many parameters are used in the above program?
1 parameter is used in above program.
How many times does the statement S=S+I get executed in the above program.
The statement S=S+I gets executed 100 times.
DECLARE FUNCTION A(X)
X=5
Z=A(X)
PRINT Z
END
FUNCTION A(X)
FOR I = 1 TO X
S=S+I
NEXT I
A=S
END FUNCTION
a) How many parameters are used in the program?
Ans: One parameter is used.
b) How many times execute the expression S=S+I in the above program?
Ans: The expression S=S+I will be executed five times in the above program
c) If the line S = S + I is changed to S = S + I ^ 2 then find the output.
Ans: The output is: 15
DECLARE FUNCTION Highest (M, N)
M=5 : N=10
PRINT Highest (M, N)
END
FUNCTION Highest(T,P)
While P<>0
R=T MOD P
T=P
P=R
Wend
Highest=T
End Function
i.What is the value the function returns in this program?
The function will return the value 5.
ii.What will happen if R=T Mod P is replaced by R=P MOD T?
Ans: The output is 10
DECLARE FUNCTION B (N)
INPUT “ENTER A NUMBER”; N
PRINT “THE EQUIVALENT NUMBER IS = “; B(N)
END
FUNCTION B (N)
WHILE N<>0
r = N MOD 2
j$ = STR$(r)
SUM$ = j$ + SUM$
N = N\2
WEND
B = VAL(SUM$)
END FUNCTION
i. What will be the output of the program, if the value is 9?
The output is 9
ii. What is the use of VAL function in the above program?
VAL will convert the string value to numeric value.
[SLC 2067]
DECLARE SUB SUM(N)
INPUT”ANY NUMBER”;N
CALL SUM(N)
END
SUB SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R
N=N\10
WEND
PRINT “SUM”;S
END SUB
In which condition the statements within the WHILE….WEND looping statement will not be executed?
Ans: When the condition is false (i.e. Value of N=0) , the statements within the WHILE….WEND looping statement will not be executed
Will the output be the same if we place “/” instead of”\” in the above program.
Ans: No. the output will not same if we place “/” instead of”\” in the above program.
DECLARE SUB take(x, y)
CLS
FOR i = 1 TO 5
READ c, d
CALL take(c, d)
NEXT i
DATA 13, 15, 16, 12, 31, 12, 16, 17, 21, 22
END
SUB take(a, b)
STATIC s
IF a > b THEN
s = s + a
ELSE
s = s + b
END IF
PRINT s;
END SUB
If the statement STATIC s is removed, then what will be the change in its output?
Ans: The statement STATIC s is removed, then the output will be:
15 16 31 17 22
List out the formal arguments and actual arguments from the above program.
Ans: Formal arguments = a, b
Actual arguments = c, d
[SLC 2064]
DECLARE FUNCTION CELLS$(W$)
W$=”CYBER”
PRINT CELL$(W$)
END
FUNCTION CELL$
K=LEN(W$)
FOR I = K TO 1 STEP -2
M$=M$+MID$(W$,I,1)
NEXT I
CELLS$=M$
END FUNCTION
Why is $(dollar) sign followed in the function name?
Ans: $(dollar) sign followed in the function name because the function returns string value.
What will be the output of the program when it is executed?
Ans: The output is : CBR
What will be the output of the program when FOR loop is changed as FOR I= 1 TO K STEP 2?
Ans: The output is: RBC
What is the name of sign “+” used in the program and what operation does it perform?
Ans: The name of sign “+” is string operator and it is used to join the string i.e. string concatenation.
[SLC 2070]
DECLARE FUNCTION Sum(A,B)
INPUT “Enter first number:”; A
INPUT “Enter second number:”; B
PRINT “The sum of the two number=”;Sum(A,B)
END
FUNCTION SUM(A,B)
S=A+B
Sum=S
END FUNCTION
a) List the numerical variables used in the above program.
Ans: The numerical variables used in the above program are S, A and B.
b) Will the program run if the first line (i.e. DECLARE….) is deleted?
Ans: Yes, the program will run if the first line (i.e. DECLARE….) is deleted
[SLC 2070 S]
DECLARE FUNCTION rev$ (N$)
INPUT "Any string"; N$
PRINT rev$ (N$)
END
FUNCTION rev$ (N$)
FOR X = LEN (N$) to 1 STEP -1
A$=MID$ (N$, X, 1)
B$ = B$ + A$
NEXT X
rev$ = B$
END FUNCTION
List the library function used in the above program.
Ans: The library function used in the above program are LEN( ) and MID$( )
What will be the maximum value of X if the N$ is equal to "Computer".
Ans: be the maximum value of X if the N$ is equal to "Computer" is 8.
[SEE 2074]
DECLARE FUNCTION SUM (N)
INPUT "Enter any number", N
S = SUM (N)
PRINT "The Sum of individual digit is:", S
END
FUNCTION SUM (N)
WHILE N > 0
R = N MOD 10
T = T + R
N = N\10
WEND
SUM = T
END FUNCTION.
State the purpose of using variable S in line 4 in above program.
Ans: The purpose of using variable S in line 4 in above program is to store the value returned by the function SUM.
Write the use of MOD in above program.
Ans: The use of MOD operator is to return the remainder.
[SEE 2075 U]
DECLARE SUB TEST (N$ )
INPUT N$
CALL TEST ( N$ )
END
SUB TEST (N$ )
FOR P = 1 TO LEN ( N$ )
B$ = MID$ (N$, P, 1)
IF LCASE$ (B$) = “a” THEN
C = C + 1
END IF
NEXT P
PRINT C
END SUB
a) Write the name of the sub procedure used in the above program.
Ans: The name of the sub procedure used in the above program is TEST
b) Write any two library functions used in the above program.
Ans: Any two library functions used in the above program are MID$( ) and LEN( )
[MM 2076]
DECLARE FUNCTION SUM (N)
FOR I = 1TO 4
READ N
DATA 15 ,25, 69
PRINT SUM (N)
NEXT
END
FUNCTION SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R
N=INT (N\10)
WEND
SUM=S
END FUNCTION
a) How many times the main function will be executed in the above program?
Ans: The main function will be executed 4 times.
b) List the relational operators used in the above proram?
Ans: The relational operators used are : = and < >
Qbasic Programming Questions [180]
1. Using FUNCTION…END FUNTION, write a program to calculate the average of three numbers
DECLARE FUNCTION AVERAGE (A, B, C)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
INPUT “ENTER THIRD NUMBER”; C
PRINT “AVERAGE OF THREE NUMBERS”; AVERAGE (A, B, C)
FUNCTION AVERAGE (A, B, C)
AVERAGE = (A + B + C) / 3
END FUNCTION
4. Using FUNCTION, write a program to input any five numbers and display their sum using array (DIM)
DECLARE FUNCTION SUM (N ( ))
CLS
DIM N( 5)
FOR I = 1 TO 5
INPUT "Enter any 5 numbers"; N (I)
NEXT I
PRINT "Sum of any 5 numbers is"; SUM(N ( ))
END
FUNCTION SUM (N ( ))
FOR I = 1 TO 5
S = S + N (I)
NEXT I
SUM = S
END FUNCTION 2. Write a program using SUB to find the average of any two numbers given by the user.
DECLARE SUB AVERAGE (A, B)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
CALL AVERAGE (A, B)
END
SUB AVERAGE (A, B)
AV = (A + B) / 2
PRINT “AVERAGE OF TWO NUMBERS”; AV
END SUB
5. Write a program in QBASIC to find square of a given number using FUNCTION…..END FUNCTION.
DECLARE FUNCTION SQUARE (N)
CLS
INPUT “ENTER ANY NUMBER”; N
PRINT “SQUARE OF NUMBER “; SQUARE (N)
END
FUNCTION SQUARE (N)
SQUARE = N ^ 2
END FUNCTION 3. Using FUNCTION, write a program to calculate the sum, product, average and difference of two numbers.
DECLARE FUNCTION SUM (A, B)
DECLARE FUNCTION DIFF (A, B)
DECLARE FUNCTION PROD (A, B)
DECLARE FUNCTION AVERAGE (A, B)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
PRINT “SUM OF TWO NUMBERS”; SUM (A, B)
PRINT “DIFFERENCE OF TWO NUMBERS”; DIFF (A, B)
PRINT “PRODUCT OF TWO NUMBERS”; PROD (A, B)
PRINT “AVERAGE OF TWO NUMBERS”; AVERAGE (A, B)
END
FUNCTION SUM (A, B)
SUM = A + B
END FUNCTION
FUNCTION DIFF (A, B)
DIFF = A - B
END FUNCTION
FUNCTION PROD (A, B)
PROD = A * B
END FUNCTION
FUNCTION AVERAGE (A, B)
AVERAGE = (A + B) / 2
END FUNCTION
6. Write a program in QBASIC to find square root of a given number using SUB…..END SUB.
DECLARE SUB SQROOT (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL SQROOT (N)
END
SUB SQROOT (N)
S = N ^ (1 / 2)
PRINT “SQUARE ROOT OF NUMBER “; S
END SUB 7. Write a program in QBASIC to find cube of a given number using SUB…..END SUB.
DECLARE SUB CUBE (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL CUBE (N)
END
SUB CUBE (N)
C = N ^ 3
PRINT “CUBE OF NUMBER “; C
END SUB 8. Write a program in QBASIC to find cube root of a given number using FUNCTION…..END FUNCTION.
DECLARE FUNCTION CBROOT (N)
CLS
INPUT “ENTER ANY NUMBER”; N
PRINT “CUBE ROOT OF NUMBER “; CBROOT (N)
END
FUNCTION CBROOT (N)
CBROOT = N ^ (1 / 3)
END FUNCTION
9. Write a program in QBASIC to find the sum of cube of two input numbers using SUB…..END SUB
DECLARE SUB CUBE (A, B,)
CLS
INPUT “ENTER FIRST NUMBER”; A
INPUT “ENTER SECOND NUMBER”; B
CALL CUBE (A, B)
END
SUB CUBE (A, B)
C = A ^ 3 + B ^ 3
PRINT “SUM OF CUBE OF TWO NUMBERS “; C
END SUB
10. Write a program to calculate and print the simple interest using FUNCTION……END FUNCTION.
DECLARE FUNCTION INTEREST (P, T, R)
CLS
INPUT “ENTER PRINCIPAL”; P
INPUT “ENTER TIME”; T
INPUT “ENTER RATE”;R
PRINT “SIMPLE INTEREST=”; INTEREST (P, T, R)
END
FUNCTION INTEREST (P, T, R)
I = P* T * R / 100
INTEREST = I
END FUNCTION
11. Using FUNCTION, write a program to calculate distance travelled by a body. (Hint: s=ut+ (1/2) at2)
DECLARE FUNCTION DISTANCE (U, T, A)
CLS
INPUT “ENTER INITIAL VELOCITY”; U
INPUT “ENTER TIME”; T
INPUT “ENTER ACCELARATION”; A
PRINT “DISTANCE TRAVELLED = “; DISTANCE (U, T, A)
END
FUNCTION DISTANCE (U, T, A)
DISTANCE = U * T + 1 / 2 * A * T ^ 2
END FUNCTION
12. Using FUNCTION……END FUNCTION, write a program to read perpendicular and base of a right angled triangle to find hypoteneous.
DECLARE FUNCTION HYP(P, B)
CLS
INPUT "ENTER PERPENDICULAR"; P
INPUT "ENTER BASE"; B
PRINT "HYPOTENUSE="; HYP (P, B)
END
FUNCTION HYP (P, B)
HYP = (P ^ 2 + B ^ 2) ^ (1 / 2)
END FUNCTION
13. Using FUNCTION……END FUNCTION, write a program to input cost price and selling price from the keyboard to calculate profit.
DECLARE FUNCTION PROFIT (CP, SP)
CLS
INPUT “ENTER COST PRICE”; CP
INPUT “ENTER SELLING PRICE”; SP
PRINT “PROFIT AMOUNT=”; PROFIT (CP, SP)
END
FUNCTION PROFIT (CP, SP)
P = SP – CP
PROFIT = P
END FUNCTION 14. Write a program using SUB……END SUB to find the area of rectangle. [A=L*B]
DECLARE SUB AREA (L, B)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
CALL AREA (L, B)
END
SUB AREA (L, B)
A = L * B
PRINT “AREA OF RECTANGLE=”; A
END SUB
15. Write a program using FUNCTION……END FUNCTION to find the perimeter of rectangle. [P=2(L+B)]
DECLARE FUNCTION PER (L, B)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
PRINT “PERIMETER OF RECTANGLE”; PER (L, B)
END
FUNCTION PER (L, B)
PER = 2 * (L + B)
END FUNCTION
16. Write a program using SUB……END SUB to find the area and perimeter of square. [P=4L] [A=L2]
DECLARE SUB AREA (L)
DECLARE SUB PERIMETER (L)
CLS
INPUT “ENTER LENGTH”; L
CALL AREA (L)
CALL PERIMETER (L)
END
SUB AREA (L)
A = L ^ 2
PRINT “AREA OF SQUARE”; A
END SUB
SUB PERIMETER (L)
P = 4 * L
PRINT “PERIMETER OF SQUARE”; P
END SUB
17.Write a program in QBASIC to find the area of four wall of a room using FUNCTION…..END FUNCTION.
DECLARE FUNCTION AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
PRINT “AREA OF FOUR WALLS”; AREA(L, B, H)
END
FUNCTION AREA (L, B, H)
A = 2 * H * (L + B)
AREA = A
END FUNCTION
18.Write a sub program cost (l,b,h,c) to find the cost of painting the four walls of a room.
DECLARE SUB AREA (L, B, H, C)
CLS
INPUT “Enter Length”; L
INPUT “Enter Breadth”; B
INPUT “Enter Height”; H
INPUT “Enter Cost”; C
CALL AREA (L, B, H, C)
END
SUB AREA (L, B, H, C)
A = 2 * H * (L + B)
T=A*C
PRINT “Cost of painting area of four walls is”; T
END SUB
19.Write a program using FUNCTION…END FUNCTION to find area of the triangle.
DECLARE FUNCTION AREA (B, H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
PRINT “AREA OF TRIANGLE ”; AREA( B, H)
END
FUNCTION AREA (B, H)
A = 1 / 2 * (B * H)
AREA = A
END FUNCTION 20.Write a program to calculate the area of triangle by using SUB…..END SUB.
[Hints:
Area= ]
DECLARE SUB AREA (A, B, C)
CLS
INPUT “ENTER VALUE FOR FIRST SIDE ”; A
INPUT “ENTER VALUE FOR SECOND SIDE ”; B
INPUT “ENTER VALUE FOR THIRD SIDE ”; C
CALL AREA (A, B, C)
END
SUB AREA (A, B, C)
S = (A + B + C) / 2
AR = (S * (S – A) * (S – B) * (S – C)) ^ (1 / 2)
PRINT “AREA OF TRIANGLE”; AR
END SUB
21.Write a program using SUB….END SUB to get radius of circle and then print its circumference. [C=2R]
DECLARE SUB CIRCUM (R)
CLS
INPUT “ENTER RADIUS”; R
CALL CIRCUM (R)
END
SUB CIRCUM (R)
C = 2 * 3.14 * R
PRINT “CIRCUMFERENCE OF CIRCLE ”; C
END SUB
22.Write a program using FUNCTION….END FUNCTION to get radius of the circle and display the area.
DECLARE FUNCTION AREA (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “AREA OF CIRCLE ”; AREA(R)
END
FUNCTION AREA (L, B)
A = 3.14 * R ^ 2
AREA = A
END FUNCTION
23.Write a program using FUNCTION…END FUNCTION to get radius of circle and then print its area and circumference.
DECLARE FUNCTION AREA (R)
DECLARE FUNCTION CIRCUM (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “AREA OF SQUARE ”; AREA(R)
PRINT “CIRCLE OF CIRCUMFERENCE”; CIRCUM (R)
END
FUNCTION AREA (R)
AREA = 3.14 * R ^ 2
END FUNCTION
FUNCTION CIRCUM (R)
CIRCUM = 2 * 3.14 * R
END FUNCTION
24.Write a program to declare user defined function using FUNCTION……END FUNCTION to calculate volume of cylinder.
DECLARE FUNCTION VOLUME (R, H)
CLS
INPUT “ENTER RADIUS”; R
INPUT “ENTER HEIGHT”; H
PRINT “VOLUME OF CYLINDER ”; VOLUME(R, H)
END
FUNCTION VOLUME (R, H)
VOLUME = 3.14 * R ^ 2 * H
END FUNCTION 25.Using Function…… End Function, write a program to calculate volume of hemisphere. [ volume = 2/3 πR3]
DECLARE FUNCTION VOLUME (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “VOLUME OF HEMISPHERE ”; VOLUME(R)
END
FUNCTION VOLUME (R)
VOLUME = (2 / 3) * 3.14 * R ^ 3
END FUNCTION
26.Using Sub…… End Sub, write a program to calculate area of sphere. [ area = 4πr2]
DECLARE SUB TSAREA (R)
CLS
INPUT “ENTER RADIUS”; R
CALL TSAREA(R)
END
SUB TSAREA (R)
A= 4 * 3.14 * R ^ 2
PRINT “TOTAL SURFACE AREA OF SPHERE “; A
END SUB
27.Write a function procedure to read the side of a cube. Calculate its volume and surface area. (Hint: vol=side3 and sa=6 side2]
DECLARE FUNCTION TSAREA (L)
DECLARE FUNCTION VOLUME (L)
CLS
INPUT “ENTER LENGTH”; L
PRINT “TOTAL SURFACE AREA OF CUBE ”; TSAREA(L)
PRINT “VOLUME OF CUBE ”; VOLUME(L)
END
FUNCTION TSAREA (L)
TSAREA = 6 * L ^ 2
END FUNCTION
FUNCTION VOLUME (L)
VOLUME = L ^ 3
END FUNCTION 28.Write a program using Function Module to calculate and print the volume of a box / cuboid. [ V=L*B*H]
DECLARE FUNCTION VOLUME (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
PRINT “VOLUME OF CUBOID ”; VOLUME(L, B, H)
END
FUNCTION VOLUME (L, B, H)
VOLUME = L * B * H
END FUNCTION 29.Write a program to create a procedure using SUB...END SUB to input the value of length, breadth and height of a box. The program should calculate the area and volume of the box.
DECLARE FUNCTION TSAREA (L, B, H)
DECLARE FUNCTION VOLUME (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
PRINT “TOTAL SURFACE AREA OF CUBOID ”; TSAREA(L, B, H)
PRINT “VOLUME OF CUBOID ”; VOLUME(L, B, H)
END
FUNCTION TSAREA (L, B, H)
TSAREA = 2 * (L * B + B * H + H * L)
END FUNCTION
FUNCTION VOLUME (L, B, H)
VOLUME = L * B * H
END FUNCTION
30.Write a program in QBASIC to find the total surface area of a box using FUNCTION….END FUNCTION.
DECLARE FUNCTION TSAREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
PRINT “TOTAL SURFACE AREA OF CUBOID”; TSAREA (L, B, H)
END
FUNCTION TSAREA (L, B, H)
TSAREA = 2 * (L * B + B * H + H * L)
END FUNCTION 31.Solve a quadratic equation ax2+bx+c=0 on the basis of the coefficient values a, b, and c using sub procedure. [x=(-b±√(b^2-4ac))/2a]
DECLARE SUB EQUATION (A, B, C)
CLS
INPUT "ENTER VALUE FOR A"; A
INPUT "ENTER VALUE FOR B"; B
INPUT "ENTER VALUE FOR C"; C
CALL EQUATION (A, B, C)
END
SUB EQUATION (A, B, C)
D = (B * B - 4 * A * C) ^ (1 / 2)
X = (-B + D) / 2 * A
Y = (-B - D) / 2 * A
PRINT "SOLUTION OF QUADRATIC EQUATION ARE"; X; Y
END SUB 32.Write a program using Function…..End Function to get temperature in Celsius from the user and then print the temperature in Fahrenheit.(hint: F=9C/5+32)
DECLARE FUNCTION CONVERT (C)
CLS
INPUT “ENTER TEMPERATURE IN CELCIUS”; C
PRINT “TEMPERATURE IN FARENHEIT=”; CONVERT (C)
END
FUNCTION CONVERT (C)
F = 9 * C / 5 + 32
CONVERT = F
END FUNCTION
33.Write a program to input Fahrenheit and convert it into Celsius using SUB - END SUB.
DECLARE SUB CONVERT (F)
CLS
INPUT “ENTER TEMPERATURE IN FARENHEIT”; F
CALL CONVERT (F)
END
SUB CONVERT (F)
C = (F – 32) * (5 / 9)
PRINT “TEMPERATURE IN CELCIUS=”; C
END SUB
34.Write a program to convert USD(dollar) into NC (NEPALI currency) using FUNCTION.
DECLARE FUNCTION CONVERT (D)
CLS
INPUT “ENTER CURRENCY VALUE IN DOLLAR”; D
PRINT “NEPALESE CURRENCY VALUE=”; CONVERT (D)
END
FUNCTION CONVERT (D)
NC = D * 110
CONVERT = NC
END FUNCTION
35.Write a program to convert NC (NEPALI currency) into IC (Indian Currency) using DECLARE SUB.
DECLARE SUB CONVERT (NC)
CLS
INPUT “ENTER VALUE IN NEPALESE RUPEES”; NC
CALL CONVERT (NC)
END
SUB CONVERT (NC)
IC = NC / 1.6
PRINT “INDIAN CURRENCY VALUE=”; IC
END SUB
36.WRITE A PROGRAM to ask a number as paisa and convert them into corresponding rupees only solve it using SUB Procedure.
DECLARE SUB CONVERT (P)
CLS
INPUT “ENTER VALUE IN PAISE”; P
CALL CONVERT (P)
END
SUB CONVERT (P)
R = P / 100
PRINT “Rupees=”; R
END SUB 37.Write a program to input distance in kilometre and convert into meter using function procedure.
DECLARE FUNCTION CONVERT (K)
CLS
INPUT “ENTER DISTANCE IN KILOMETER”; K
PRINT “DISTANCE IN METER=”; CONVERT (K)
END
FUNCTION CONVERT (K)
M = K * 1000
CONVERT = M
END FUNCTION
38.Write a program to input days and convert into years, months and days using sub procedure.
DECLARE SUB CONVERT(D)
CLS
INPUT “ENTER DAYS”; D
CALL CONVERT(D)
END
SUB CONVERT (D)
Y = D \ 365
MO = D MOD 365
M = MO \ 30
D = MO MOD 30
PRINT Y; “YEARS ” ; M; “MONTHS”; D; “DAYS”
END SUB
39.Write a program to input seconds and convert into hours minutes and seconds using sub procedure.
DECLARE SUB CONVERT(S)
CLS
INPUT “ENTER TIME IN SECONDS”; S
CALL CONVERT(S)
END
SUB CONVERT (S)
H = S \ 3600
MI = S MOD 3600
M = MI \ 60
S = MI MOD 60
PRINT H; “HOURS”; M; “MINUTES”; S; “SECONDS”
END SUB
40.Write a function convert (N) to read a number in inches and convert it into feet and inches.
[1 foot = 12 inches]
DECLARE FUNCTION CONVERT(N)
CLS
INPUT "ENTER VALUE IN INCHES"; N
PRINT CONVERT(N); "FEET"; IN; "INCHES"
END
FUNCTION CONVERT (N)
SHARED IN
IN = N MOD 12
CONVERT = N \ 12
END FUNCTION
41.Write a program to input any number and check whether the given no. is divisible by 3 and 7 or not using function procedure.
DECLARE FUNCTION CHECK$ (N)
CLS
INPUT “Enter any number”; N
PRINT “The given number is ”; CHECK$(N)
END
FUNCTION CHECK$ (N)
IF N MOD 3 = 0 AND N MOD 7 = 0 THEN
CHECK$ = “divisible by 3 and 7”
ELSE
CHECK$ = “not divisible by 3 and 7”
END IF
END FUNCTION
42.Using SUB…END SUB, write a program to test whether the given number is completely divisible by 13 or not.
DECLARE SUB CHECK (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL CHECK (N)
END
SUB CHECK (N)
IF N MOD 13 = 0 THEN
PRINT “The given number is divisible by 13”
ELSE
PRINT “The given number is not divisible by 13”
END IF
END SUB 43.Write a program to declare a sub procedure module to decide whether an input no is multiple of 5 or not.
DECLARE SUB CHECK (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL CHECK (N)
END
SUB CHECK (N)
IF N MOD 5 = 0 THEN
PRINT “The given number is multiple of 5”
ELSE
PRINT “The given number is not multiple of 5”
END IF
END SUB 44.Write a function program to find whether the given number is perfect number or not.
DECLARE FUNCTION PERFECT (N)
CLS
INPUT "ENTER ANY NUMBER"; N
PR = PERFECT (N)
IF PR = N THEN
PRINT "PERFECT NUMBER"
ELSE
PRINT "NOT PERFECT NUMBER"
END IF
END
FUNCTION PERFECT (N)
S = 0
FOR I = 1 TO N - 1
IF N MOD I = 0 THEN S = S + I
NEXT I
PERFECT = S
END FUNCTION
45.Write a sub program to find whether the given number is perfect square number or not.
DECLARE SUB PERFECT (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL PERFECT (N)
END
SUB PERFECT (N)
S = SQR(N)
IF S = INT(S) THEN
PRINT "PERFECT SQUARE"
ELSE
PRINT "NOT PERFECT SQUARE"
END IF
END SUB
46.Write a program to display only perfect square numbers between 1 to 100 using SUB-END SUB.
DECLARE SUB PERFECT ( )
CLS
CALL PERFECT
END
SUB PERFECT ()
FOR N = 1 TO 100
S = SQR(N)
IF S = INT(S) THEN PRINT N,
NEXT N
END SUB
47.Write a program to define a function procedure which returns whether a input number is positive, negative or zero using SGN function.
DECLARE FUNCTION CHECK$ (N)
CLS
INPUT "Enter any number"; N
PRINT "The given number is "; CHECK$(N)
END
FUNCTION CHECK$ (N)
S = SGN(N)
SELECT CASE S
CASE 1
CHECK$ = "positive number"
CASE -1
CHECK$ = "negative number"
CASE 0
CHECK$ = "zero"
END SELECT
END FUNCTION
48.Write a program to input any number and display whether it is odd or even using function procedure.
DECLARE FUNCTION CHECK$ (N)
CLS
INPUT “ENTER ANY NUMBER”; N
PRINT “THE GIVEN NUMBER IS “; CHECK$(N)
END
FUNCTION CHECK$ (N)
IF N MOD 2 = 0 THEN
CHECK$ = “EVEN NUMBER”
ELSE
CHECK$ = “ODD NUMBER”
END IF
END FUNCTION
49.Write a program to input a year and display whether that year is a leap year or not. [divisible by 4 but not 100] using sub procedure.
DECLARE SUB CHECK (Y)
CLS
INPUT “ENTER YEAR”; Y
CALL CHECK (Y)
END
SUB CHECK (Y)
IF Y MOD 4 = 0 AND Y MOD 100 <> 0 OR Y MOD 400 = 0 THEN
PRINT “LEAP YEAR”
ELSE
PRINT “NOT LEAP YEAR”
END IF
END SUB
50.Write a program to input any number and check whether the given no. is positive or negative using sub procedure.
DECLARE SUB CHECK (N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL CHECK (N)
END
SUB CHECK (N)
IF N > 0 THEN
PRINT “ POSITIVE NUMBER”
ELSEIF N < 0 THEN
PRINT “ NEGATIVE NUMBER”
END IF
END SUB
51.Input the age of a person and find out whether the person is eligible to drive or not using function procedure. [age >=16]
DECLARE FUNCTION CHECK$ (A)
CLS
INPUT “ENTER YOUR AGE”; A
PRINT “YOU ARE “; CHECK$(A)
END
FUNCTION CHECK$ (A)
IF A >= 16 THEN
CHECK$ = “ELIGIBLE TO DRIVE”
ELSE
CHECK$ = “ NOT ELIGIBLE TO DRIVE”
END IF
END FUNCTION
52.Input the age of a person and find out whether the person can cast vote or not using sub procedure. [age >=18]
DECLARE FUNCTION CHECK$ (A)
CLS
INPUT “ENTER YOUR AGE”; A
PRINT “YOU ARE “; CHECK$(A)
END
FUNCTION CHECK$ (A)
IF A >= 18 THEN
CHECK$ = “ELIGIBLE TO VOTE”
ELSE
CHECK$ = “ NOT ELIGIBLE TO VOTE”
END IF
END FUNCTION 53.Write a program to enter any two numbers and display the smaller one using function procedure.
DECLARE FUNCTION SMALL (A, B)
INPUT “ENTER ANY TWO NUMBERS”; A, B
PRINT “THE SMALLER NUMBER IS”; SMALL (A, B)
END
FUNCTION SMALL (A, B)
IF A < B THEN
SMALL = A
ELSE
SMALL = B
END IF
END FUNCTION
54.Write a program to enter any three numbers and display the smallest one using function procedure.
DECLARE SUB SMALL (A, B, C)
CLS
INPUT “ENTER ANY THREE NUMBERS”; A, B, C
CALL SMALL (A, B, C)
END
SUB SMALL (A, B, C)
IF A < B AND A < C THEN
S = A
ELSEIF B < A AND B < C THEN
S = B
ELSE
S = C
END IF
PRINT “THE SMALLEST NUMBER IS “; S
END SUB
55.Write a program to enter any three numbers and display the middle number using sub procedure.
DECLARE SUB MIDDLE(A, B, C)
CLS
INPUT “ENTER ANY THREE NUMBERS”; A, B, C
CALL MIDDLE (A, B, C)
END
SUB MIDDLE (A, B, C)
IF A > B AND A < C OR A < B AND A > C THEN
PRINT “THE MIDDLE NUMBER IS”; A
ELSEIF B > A AND B < C OR B < A AND B > C THEN
PRINT “THE MIDDLE NUMBER IS”; B
ELSE
PRINT “THE MIDDLE NUMBER IS”; C
END IF
END SUB 56.Write a program to input three different numbers in the main module then find the greatest number using SUB….END SUB.
DECLARE FUNCTION GREAT (A, B, C)
INPUT “ENTER ANY THREE NUMBERS”; A, B, C
PRINT “THE GREATEST NUMBER IS”; GREAT (A, B, C)
END
FUNCTION GREAT (A, B, C)
IF A > B AND A > C THEN
G = A
ELSEIF B > A AND B > C THEN
G = B
ELSE
G = C
END IF
GREAT = G
END FUNCTION
57.Write a sub program to input 20 different numbers in an array variable and find the largest and smallest number
DECLARE SUB GREAT ( )
DECLARE SUB SMALL ( )
DIM SHARED N(20)
CLS
FOR I = 1 TO 20
INPUT "ENTER THE NUMBERS"; N(I)
NEXT I
CALL GREAT
CALL SMALL
END
SUB GREAT
G = N(1)
FOR I = 2 TO 20
IF N(I) > G THEN G = N(I)
NEXT I
PRINT "GREATEST NUMBER"; G
END SUB
SUB SMALL
S = N(1)
FOR I = 2 TO 20
IF N(I) < S THEN S = N(I)
NEXT I
PRINT "SMALLEST NUMBER"; S
END SUB
58.Write a sub program to input three sides of a triangle and determine whether a triangle can be formed or not.
DECLARE SUB CHECK (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END
SUB CHECK (A, B, C)
IF (A + B) > C AND (B + C) > A AND (A + C) > B THEN
PRINT “THE TRIANGLE CAN BE FORMED”
ELSE
PRINT “THE TRIANGLE CANNOT BE FORMED”
END IF
END SUB
59.Write a function program to input three sides of a triangle and determine whether a triangle is right angled triangle or not.
DECLARE FUNCTION CHECK$ (H, B, P)
CLS
INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P
PRINT CHECK$ (H, B, P)
END
FUNCTION CHECK$ (H, B, P)
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
CHECK$ = “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
CHECK$ = “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END FUNCTION
60.Write a sub program to input three sides of a triangle and determine whether a triangle is equilateral, isosceles or scalene triangle or not.
DECLARE SUB CHECK (A, B, C)
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END
SUB CHECK (A, B, C)
IF A = B AND B = C THEN
PRINT “IT IS A EQUILATERAL TRIANGLE”
ELSEIF A = B OR B = C OR C = A THEN
PRINT “IT IS ISOSCELES TRIANGLE”
ELSEIF A < > B AND B < > C THEN
PRINT “ IT IS A SCALENE TRIANGLE”
END IF
END SUB 61.WAP to print the sum of the digits of a given numbers using SUB Procedure.
DECLARE SUB SUM (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL SUM (N)
END
SUB SUM (N)
S = 0
WHILE N < > 0
R = N MOD 10
S = S + R
N = N \ 10
WEND
PRINT "SUM OF DIGITS"; S
END SUB
62.Write a program to enter a number and find the product of its digits using FUNCTION procedure.
DECLARE FUNCTION PROD (N)
CLS
INPUT "ENTER ANY NUMBER"; N
PR = PROD (N)
PRINT "PRODUCT OF DIGITS"; PR
END
FUNCTION PROD (N)
P = 1
WHILE N < > 0
R = N MOD 10
P = P * R
N = N \ 10
WEND
PROD = P
END FUNCTION
63.Write a sub program to input number and find sum of even digits.
DECLARE SUB SUMEVEN (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL SUMEVEN (N)
END
SUB SUMEVEN (N)
S = 0
WHILE N < > 0
R = N MOD 10
IF R MOD 2 = 0 THEN S = S + R
N = N \ 10
WEND
PRINT "SUM OF EVEN DIGITS"; S
END SUB 64.Write a sub program to input number and count total no. of digits.
DECLARE SUB COUNT (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL COUNT (N)
END
SUB COUNT (N)
C = 0
WHILE N < > 0
C = C + 1
N = N \ 10
WEND
PRINT "TOTAL NUMBER OF DIGITS"; C
END SUB 65.Write a function program to input number and display only odd digits.
DECLARE FUNCTION ODD (N)
REM
CLS
INPUT "ENTER ANY NUMBER"; N
PRINT " ODD DIGITS ARE ";
D = ODD(N)
END
FUNCTION ODD (N)
WHILE N <> 0
R = N MOD 10
IF R MOD 2 = 1 THEN PRINT R;
N = N \ 10
WEND
END FUNCTION
66.Write a program using FUNCTION procedure to reverse and display the integer number having more than one digit passed as arguments from the main module. [Hint: 123 is reversed as 321].
DECLARE FUNCTION REV (N)
CLS
INPUT "ENTER ANY NUMBER"; N
PRINT " REVERSED DIGITS="; REV (N)
END
FUNCTION REV (N)
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N \ 10
WEND
REV = S
END FUNCTION 67.Write a sub program to input any number and check whether the given no. is palindrome or not.
DECLARE SUB PALIN (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL PALIN (N)
END
SUB PALIN (N)
A = N
S = 0
WHILE N < > 0
R = N MOD 10
S = S * 10 + R
N = N \ 10
WEND
IF A = S THEN
PRINT A; "IS PALINDROME"
ELSE
PRINT A; "IS NOT PALINDROME"
END IF
END SUB 68.Write a sub program to display first 20 palindrome numbers.
DECLARE SUB PALIN ( )
CLS
CALL PALIN
END
SUB PALIN
N = 1
CNT = 1
TOP:
A = N : S = 0
WHILE A < > 0
R = A MOD 10
S = S * 10 + R
A = A \ 10
WEND
IF N = S THEN
PRINT N,
CNT = CNT + 1
END IF
N = N + 1
IF CNT <= 20 THEN GOTO TOP
END SUB
69.Write a sub program to display all palindrome numbers from 1 to 200.
DECLARE SUB PALIN ( )
CLS
CALL PALIN
END
SUB PALIN
N = 1
FOR I = 1 TO 200
A = N
S = 0
WHILE A < > 0
R = A MOD 10
S = S * 10 + R
A = A \ 10
WEND
IF N = S THEN PRINT N,
N = N + 1
NEXT I
END SUB 70.Write a function program to input any number and check whether the given no. is Armstrong or not.
DECLARE FUNCTION ARM (N)
INPUT "ENTER ANY NUMBER"; N
A=N
AR = ARM (N)
IF A = AR THEN
PRINT A; "IS ARMSTRONG NUMBER"
ELSE
PRINT A; "IS NOT ARMSTRONG NUMBER"
END IF
END
FUNCTION ARM (N)
S = 0
WHILE N < > 0
R = N MOD 10
S = S + R ^ 3
N = N \ 10
WEND
ARM = S
END FUNCTION 71.Write a sub program to display first 5 Armstrong numbers.
DECLARE SUB ARM ( )
CLS
CALL ARM
END
SUB ARM
N = 1 : CNT = 1
TOP:
A = N
S = 0
WHILE A < > 0
R = A MOD 10
S = S + R ^ 3
A = A \ 10
WEND
IF N = S THEN
PRINT N,
CNT = CNT + 1
END IF
N = N + 1
IF CNT <= 5 THEN GOTO TOP
END SUB
72.Write a sub program to display all Armstrong numbers from 1 to 500.
DECLARE SUB ARM ( )
CLS
CALL ARM
END
SUB ARM
N = 1
FOR I = 1 TO 500
A = N
S = 0
WHILE A <> 0
R = A MOD 10
S = S + R ^ 3
A = A \ 10
WEND
IF N = S THEN PRINT N,
N = N + 1
NEXT I
END SUB 73.Write a function program to input number and check whether the given no. is prime or composite.
DECLARE FUNCTION PRIME(N)
CLS
INPUT "ENTER ANY NUMBER"; N
P = PRIME (N)
IF P = 2 THEN
PRINT N; "IS PRIME NUMBER"
ELSE
PRINT N; "IS COMPOSITE NUMBER"
END IF
END
FUNCTION PRIME (N)
C = 0
FOR I = 1 TO N
IF N MOD I = 0 THEN C = C + 1
NEXT I
PRIME = C
END FUNCTION 74.Write a sub program to display all prime numbers from 1 to 100.
DECLARE SUB PRIME ( )
CLS
CALL PRIME
END
SUB PRIME
FOR N = 1 TO 100
C = 0
FOR I = 1 TO N
IF N MOD I = 0 THEN C = C + 1
NEXT I
IF C = 2 THEN PRINT N,
NEXT N
END SUB
75.Write a sub program to display first 20 prime numbers.
DECLARE SUB PRIME ( )
CALL PRIME
END
SUB PRIME
N = 1
CNT = 1
TOP:
C = 0
FOR I = 1 TO N
IF N MOD I = 0 THEN C = C + 1
NEXT I
IF C = 2 THEN
PRINT N,
CNT = CNT + 1
END IF
N = N + 1
IF CNT <= 20 THEN GOTO TOP
END SUB
76.Write a sub program to input number and check whether the given no. Composite or not.
DECLARE SUB COMPOSITE (N)
INPUT "ENTER ANY NUMBER"; N
CALL COMPOSITE (N)
END
SUB COMPOSITE (N)
C = 0
FOR I = 1 TO N
IF N MOD I = 0 THEN C = C + 1
NEXT I
IF C < > 2 THEN
PRINT N; "IS COMPOSITE NUMBER"
ELSE
PRINT N; "IS NOT COMPOSITE NUMBER"
END IF
END SUB 77.Write a sub program to input any number and display the factors.
DECLARE SUB FACT (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL FACT (N)
END
SUB FACT (N)
PRINT "FACTORS OF"; N; "=";
FOR I = 1 TO N
IF N MOD I = 0 THEN PRINT I;
NEXT I
END SUB
78.Write a program source code using FUNCTION.....END FUNCTION to calculate the factorial of an input number.
DECLARE FUNCTION FACT (N)
CLS
INPUT "ENTER ANY NUMBER"; N
PRINT "FACTORIAL ="; FACT (N)
END
FUNCTION FACT (N)
F = 1
FOR I = 1 TO N
F = F * I
NEXT I
FACT = F
END FUNCTION
79.Write a program using a SUB procedure module to print the multiplication table of any input number up to tenth terms. [SEE 2075 S2]
DECLARE SUB MUL (N)
CLS
INPUT "ENTER ANY NUMBER"; N
CALL MUL (N)
END
SUB MUL (N)
FOR I = 1 TO 10
PRINT N; "X"; I; "="; N * I
NEXT I
END SUB
80.Write a program in QBASIC to input any two different number and print HCF and LCM using SUB………END SUB
DECLARE SUB HCF(A, B)
CLS
INPUT "ENTER ANY TWO NUMBERS"; A, B
CALL HCF (A, B)
END
SUB HCF (A, B)
WHILE A MOD B < > 0
T = A MOD B
A = B
B = T
WEND
PRINT "H.C.F="; B
END SUB
81.Write a program in QBASIC to display the following series using SUB…. END SUB.
5, 55, 555 ….. up to 6th terms
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 5
FOR I = 1 TO 5
PRINT A,
A = A * 10 + 5
NEXT I
END SUB 82.Write a program using sub procedure to print series: 1, 11, 111, 1111, 11111
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 1
FOR I = 1 TO 5
PRINT A,
A = A * 10 + 1
NEXT I
END SUB 83.Write a program to display 33333, 3333, 333, 33, 3 by using SUB........END SUB
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 33333
FOR I = 1 TO 5
PRINT A
A = A \ 10
NEXT I
END SUB
84.Write a sub procedure to display 1, 12, 123, 1234, 12345
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 5
FOR J = 1 TO I
PRINT J;
NEXT J
PRINT
NEXT I
END SUB 85.Write a sub procedure to display 1, 22, 333, 4444, 55555
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 5
FOR J = 1 TO I
PRINT I;
NEXT J
PRINT
NEXT I
END SUB 86.Write a sub procedure to display 12345, 1234, 123, 12, 1
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
FOR I = 5 TO 1 STEP -1
FOR J = 1 TO I
PRINT J;
NEXT J
PRINT
NEXT I
END SUB
87.Write a sub procedure to display 55555, 4444, 333, 22, 1
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 5 TO 1 STEP -1
FOR J = 1 TO I
PRINT I;
NEXT J
PRINT
NEXT I
END SUB
88.Write a sub procedure to display 54321, 5432, 543, 54, 5
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 5 TO 1 STEP -1
FOR J = I TO 1 STEP -1
PRINT J;
NEXT J
PRINT
NEXT I
END SUB 89.Write a sub procedure to display 5, 54, 543, 5432, 54321
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 5 TO 1 STEP -1
FOR J = 5 TO I STEP -1
PRINT J;
NEXT J
PRINT
NEXT I
END SUB
90.Write a Qbasic Program to generate 1800, 1600, 1400, ……..10th term.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 1800
FOR I = 1 TO 10
PRINT A
A = A - 200
NEXT I
END SUB 91.Write a sub procedure to display:
1, 121, 12321, 1234321, 123454321
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A# = 1
FOR I = 1 TO 5
PRINT A# ^ 2
A# = A# * 10 + 1
NEXT I
END SUB 92.Write a sub procedure to display 123454321, 1234321, 12321, 121, 1
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A# = 11111
FOR I = 1 TO 5
PRINT A# ^ 2
A# = A# \10
NEXT I
END SUB
93.Write a sub program to generate 9,28,14,7,22,11…………..10th term
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 9
FOR I = 1 TO 10
PRINT A;
IF A MOD 2 = 0 THEN
A = A \ 2
ELSE
A = A * 3 + 1
END IF
NEXT I
END SUB 94.Write a sub procedure to generate 7,22,11,34……………10th terms.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 7
FOR I = 1 TO 10
PRINT A;
IF A MOD 2 = 0 THEN
A = A \ 2
ELSE
A = A * 3 + 1
END IF
NEXT I
END SUB 95.Write a sub procedure to generate 22,11,34,17,52,26,13,40,20,10
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 22
FOR I = 1 TO 10
PRINT A;
IF A MOD 2 = 0 THEN
A = A \ 2
ELSE
A = A * 3 + 1
END IF
NEXT I
END SUB
96.Write a program to print the following series by using SUB ……END SUB: 1, 4, 9, 16.....upto 10th term.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END SUB 97.Write a program to print 1, 8, 27, 64.....upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 9
PRINT I ^ 3
NEXT I
END SUB 98.Write a display the following series: 999, 728, 511.........upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
a = 999
b = 271
c = 54
FOR i = 1 TO 10
PRINT a
a = a - b
b = b - c
c = c - 6
NEXT i
END SUB
99.Write a program to display 315, 270, 215, 150 ........ upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
a = 315
b = 45
FOR i = 1 TO 10
PRINT a
a = a - b
b = b + 10
NEXT i
END SUB 100.Write a program to display 5, 10, 20, 35, 55.........upto 10th term.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ()
A = 5
B = 5
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 5
NEXT I
END SUB
101.Write a program to print the following series 2, 8, 18, 32, 10th terms using SUB ……………. END SUB
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 2
B = 6
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 4
NEXT I
END SUB
102.Write a program to display 2 , 4, 8, 14, 22 …upto 10th terms
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 2
B = 2
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 2
NEXT I
END SUB 103.Write a program to display 2, 4, 7, 11, 16 up to 10th terms.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 2
B = 2
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 1
NEXT I
END SUB 104.Write a program to display 2,6,12,20,30 …..up to 10th term
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 2
B = 4
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 2
NEXT I
END SUB
105.Write a program to display 0,1, 3, 6, 10, 15 up to 20th terms.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 0
B = 1
FOR I = 1 TO 20
PRINT A
A = A + B
B = B + 1
NEXT I
END SUB 106.Write a program to display 1, 2, 4, 7, 11 up to 10th term.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
A = 1
B = 1
FOR I = 1 TO 10
PRINT A
A = A + B
B = B + 1
NEXT I
END SUB 107.Write a program display : 2, 8, 18, 32..........upto 10 terms.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ( )
FOR I = 1 TO 10
PRINT I ^ 2 * 2
NEXT I
END SUB
108.Write a program to display 1,2,3,5,8……………….13th terms.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES ( )
A = 1
B = 2
FOR I = 1 TO 13
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB 109.Write a program to display 5, 10, 15, 25, 40, 65, 105 ......up to 10th term
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES ( )
A = 25
B = 40
FOR I = 1 TO 10
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB 110.Write a program to display: 1, 0, 1, 1, 2, 3................... upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES ( )
A = 1
B = 0
FOR I = 1 TO 5
PRINT A;
PRINT B;
A = A + B
B = A + B
NEXT I
END SUB
111.Write a program to generate 3, 3, 6, 9, 15, 24, 39, 63, 102, 165 .
DECLARE SUB SERIES ( )
CALL SERIES
END
SUB SERIES ( )
A = 3
B = 3
FOR I = 1 TO 10
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB 112.Write a program to generate series 2, 2,4,6,10,16,……..10th terms
DECLARE SUB SERIES ( )
CALL SERIES
END
SUB SERIES ( )
A = 2
B = 2
FOR I = 1 TO 10
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB
113.Write a to generate the series: 81, 64, 49, ......1
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES ( )
FOR I = 9 TO 1
PRINT I ^ 2
NEXT I
END SUB
114.Write a sub program to display numbers 2, 4, 6, ............20.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 2 TO 20
PRINT I
NEXT I
END SUB 115.Write a sub program to display numbers 100, 90, 80, .................10
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 100 TO 80 STEP-10
PRINT I
NEXT I
END SUB 116.Write a program to print the following serial 9, 7, 5,……1
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 9 TO 1 STEP-2
PRINT I
NEXT I
END SUB
117.Write a sub program to display product of all numbers from 4 to 8.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
P = 1
FOR I = 4 TO 8
P = P * I
NEXT I
PRINT “PRODUCT OF ALL NUMBERS FROM 4 TO 8”; P
END SUB 118.Write a sub program to print first ten odd numbers. [SLC 2071 S]
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 10
S = S + I
NEXT I
PRINT “SUM OF FIRST TEN POSITIVE INTEGERS” ; S
END SUB 119.Write a program to print the natural numbers from 1 to 5 using SUB...........END SUB.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 5
PRINT I,
NEXT I
END SUB
120.Write a QBASIC program to find the sum of square of first 10 integers.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 10
S = S + I ^ 2
NEXT I
PRINT “SUM OF SQUARE FIRST 10 INTEGERS=” ; S
END SUB
121.Write a sub program to display all even numbers from 2 to 100 also display its sum.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 2 TO 100 STEP 2
PRINT I,
S = S + I
NEXT I
PRINT “SUM OF ALL EVEN NUMBERS FROM 2 TO 100=”; S
END SUB
122.Write a sub program to enter 10 different numbers then find out sum of even numbers
DECLARE SUB SUM(N())
CLS
FOR I = 1 TO 10
INPUT "ENTER 10 NUMBERS"; N(I)
NEXT I
CALL SUM(N())
END
SUB SUM (N())
FOR I = 1 TO 10
IF N(I) MOD 2 = 0 THEN S = S + N(I)
NEXT I
PRINT "SUM OF EVEN NUMBERS="; S
END SUB
123.Write a sub program using to display first 13 odd numbers.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 1
FOR I = 1 TO 13
PRINT A,
A = A+ 2
NEXT I
END SUB 124.Write a sub program using to display first 19 even numbers.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 2
FOR I = 1 TO 19
PRINT A,
A = A+ 2
NEXT I
END SUB 125.WAP to print first ten multiples of input number.
DECLARE SUB SERIES ( N)
CLS
INPUT “ENTER ANY NUMBER”; N
CALL SERIES (N)
END
SUB SERIES (N)
FOR I = 1 TO 10
PRINT N * I,
NEXT I
END SUB
126.Write a program using FUNCTION to get a word from the user and print the word in the reverse order.
DECLARE FUNCTION REV$ (S$)
CLS
INPUT "ENTER ANY STRING"; S$
PRINT "REVERSED STRING IS "; REV$(S$)
END
FUNCTION REV$ (S$)
FOR I = LEN(S$) TO 1 STEP -1
B$ = MID$(S$, I, 1)
W$ = W$ + B$
NEXT I
REV$ = W$
END FUNCTION 127.Write a program to test whether the input word is palindrome word or not using FUNCTION…………END FUNCTION.
DECLARE FUNCTION REV$ (S$)
CLS
INPUT "ENTER ANY STRING"; S$
C$ = REV$(S$)
IF S$ = C$ THEN
PRINT “THE GIVEN STRING IS PALINDROME”
ELSE
PRINT “THE GIVEN STRING IS NOT PALINDROME”
END IF
END
FUNCTION REV$ (S$)
FOR I = LEN(S$) TO 1 STEP -1
B$ = MID$(S$, I, 1)
W$ = W$ + B$
NEXT I
REV$ = W$
END FUNCTION
128.Write a program to print the shortest word among the three different word input by the user using FUNCTION…….END FUNCTION.
DECLARE FUNCTION SHRT$( A$, B$, C$)
CLS
INPUT "ENTER FIRST STRING"; A$
INPUT "ENTER SECOND STRING"; B$
INPUT "ENTER THIRD STRING"; C$
PRINT "SHORTEST STRING="; SHRT$( A$, B$, C$)
END
FUNCTION SHRT$( A$, B$, C$)
IF LEN(A$) < LEN(B$) AND LEN(A$) < LEN(C$) THEN
S$ = A$
IF LEN(B$) < LEN(A$) AND LEN(B$) < LEN(C$) THEN
S$ = B$
ELSE
S$ = C$
END IF
SHRT$ = S$
END FUNCTION 129.Write a function program to enter any ten strings and display the shortest string.
DECLARE FUNCTION SHRT$( A$ )
CLS
INPUT "ENTER FIRST STRING"; A$
PRINT "SHORTEST STRING="; SHRT$(A$)
END
FUNCTION SHRT$(A$)
FOR I = 2 TO 10
INPUT "ENTER NEXT STRING"; B$
IF LEN(B$) < LEN(A$) THEN A$ = B$
NEXT I
SHRT$ = A$
END FUNCTION
130.Write a program using FUNCTION….END FUNCTION to input a string and count the total number of consonants.
DECLARE FUNCTION COUNT (S$)
CLS
INPUT "ENTER ANY STRING"; S$
PRINT "TOTAL NO. OF CONSONANTS= "; COUNT(S$)
END
FUNCTION COUNT (S$)
CC = 0
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
C$ = UCASE$(B$)
IF C$ <> "A" AND C$ <> "E" AND C$ <> "I" AND C$ <> "O" AND C$ <> "U" THEN CC = CC + 1
NEXT I
COUNT = CC
END FUNCTION 131.Write a program to find the numbers of vowels in an input string using ‘SUB…..END SUB’.
DECLARE SUB COUNT (S$)
CLS
INPUT "ENTER ANY STRING"; S$
CALL COUNT(S$)
END
SUB COUNT (S$)
VC = 0
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
C$ = UCASE$(B$)
IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN VC = VC + 1
NEXT I
PRINT "TOTAL NO. OF VOWELS= "; VC
END SUB
132.Write a program using FUNCTION... END FUNCTION to count the number of words in a sentence.
DECLARE FUNCTION COUNT (S$)
CLS
INPUT "ENTER ANY STRING"; S$
PRINT "TOTAL NO. OF WORDS= "; COUNT(S$)
END
FUNCTION COUNT (S$)
WC = 1
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
IF B$ = " " THEN WC = WC + 1
NEXT I
COUNT = WC
END FUNCTION
133.Write a program to declare SUB procedure to print only the vowels from a given word.
DECLARE SUB DISPV (S$)
CLS
INPUT "ENTER ANY STRING"; S$
CALL DISPV(S$)
END
SUB DISPV(S$)
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
C$ = UCASE$(B$)
IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN C$=C$+ B$
END IF
NEXT I
PRINT “VOWELS ONY ARE”; C$
END SUB
134.Write a program to input a string then print vowel characters in upper case and consonant characters in lower case using function – end function. (Suppose input string is NEPAL then output should be nEpAl)
DECLARE SUB ALT(S$)
CLS
INPUT "ENTER ANY WORD"; S$
CALL ALT(S$)
END
SUB ALT$ (S$)
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
IF I MOD 2 = 1 THEN
W$ = W$ + LCASE$(B$)
ELSE
W$ = W$ + UCASE$(B$)
END IF
NEXT I
PRINT W$
END SUB
135.Write a program to enter any word and print alternate case of each character using DECLARE SUB eg. Nepal to NePaL.
DECLARE SUB ALT(S$)
CLS
INPUT "ENTER ANY WORD"; S$
CALL ALT(S$)
END
SUB ALT$ (S$)
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
IF I MOD 2 = 1 THEN
W$ = W$ + LCASE$(B$)
ELSE
W$ = W$ + UCASE$(B$)
END IF
NEXT I
PRINT W$
END SUB
136.Write a function program to enter a string and then find out the sum of even ASCII value of each characters.
DECLARE FUNCTION SUM(A$)
CLS
INPUT "ENTER ANY STRING"; A$
PRINT " SUM OF EVEN ASCII VALUE="; SUM(A$)
END
FUNCTION SUM (A$)
FOR I = 1 TO LEN(A$)
B$ = MID$(A$, I, 1)
C = ASC(B$)
IF C MOD 2 = 0 THEN S = S + C
NEXT I
SUM=S
END FUNCTION 137.Write a sub program to input any string and display only consonant by removing vowels.
DECLARE FUNCTION DISP$ (S$)
CLS
INPUT "ENTER ANY STRING"; S$
PRINT DISP(S$)
END
FUNCTION DISP$ (S$)
FOR I = 1 TO LEN(S$)
B$ = MID$(S$, I, 1)
C$ = UCASE$(B$)
IF C$ <> "A" AND C$ <> "E" AND C$ <> "I" AND C$ <> "O" AND C$ <> "U" AND C$ <> " " THEN W$=W$+B$
END IF
NEXT I
DISP$ = W$
END FUNCTION
138.Write a program to enter a long string and display only initial character of each word Using function procedure.
DECLARE FUNCTION INIT$(A$)
CLS
INPUT "ENTER ANY STRING"; A$
PRINT INIT$(A$)
END
FUNCTION INIT$ (A$)
C$ = LEFT$(A$, 1)
FOR I = 1 TO LEN(A$)
B$ = MID$(A$, I, 1)
IF B$ = " " THEN C$ = C$ + MID$(A$, I + 1, 1)
NEXT I
INIT$ = C$
END FUNCTION 139.Write a program using SUB……….END SUB to display:
N
E
P
A
L
DECLARE SUB PATTERN (S$)
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT MID$(S$, I, 1)
NEXT I
END SUB
140.Write a program to display the following pattern: -
H
KHA
OKHAR
POKHARA
DECLARE SUB PATTERN (S$)
S$ = "POKHARA"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 4
FOR I = 1 TO LEN(S$) STEP 2
PRINT TAB(A); MID$(S$, A, I)
A = A - 1
NEXT I
END SUB 141.Write a program using SUB..........END SUB to display -
NEPAL
NEPA
NEP
NE
N
DECLARE SUB PATTERN (S$)
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP - 1
PRINT LEFT$(S$, I)
NEXT I
END SUB
142.Write a program using SUB……….END SUB to display.
N
NE
NEP
NEPA
NEPAL
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END SUB 143.Write a sub to print the following pattern:
NEPAL
EPAL
PAL
AL
L
DECLARE SUB PATTERN (S$)
CLS
S$ = "NEPAL"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = LEN(S$) TO 1 STEP - 1
PRINT RIGHT$(S$, I)
NEXT I
END SUB
144.Write a SUB procedure to generate given below:
E V E R E S T
V E R E S
E R E
R
DECLARE SUB PATTERN (S$)
S$ = "EVEREST"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
A = 1
FOR I = LEN(S$) TO 1 STEP -2
PRINT TAB(A); MID$(S$, A, I)
A = A + 1
NEXT I
END SUB 145.Print following pattern
*
***
*****
*******
DECLARE SUB PATTERN (S$)
CLS
S$ = "*******"
CALL PATTERN(S$)
END
SUB PATTERN (S$)
FOR I = 1 TO LEN(S$) STEP 2
PRINT LEFT$(S$, I)
NEXT I
END SUB
146.Write a program to store Roll no., Name, Class and Address of any five students. [SEE 2074]
OPEN "Student.dat" FOR OUTPUT AS #1
FOR I = 1 TO 5
INPUT "Enter Roll No."; r
INPUT "Enter Name"; n$
INPUT "Enter Class"; c
INPUT "Enter Address"; a$
WRITE #1, r, n$, c, a$
NEXT I
CLOSE #1
END 147.A sequential data file called “student.dat” contains same records under the field’s name, english, nepali and computer. Write a program to add some more records in the same sequential data file. [SLC 2068]
OPEN “student.dat” FOR APPEND AS #1
DO
CLS
INPUT “ENTER NAME”; N$
INPUT “ENTER MARKS IN ENGLISH”; E
INPUT “ENTER MARKS IN NEPALI”; N
INPUT “ENTER MARKS IN COMPUTER”; C
WRITE #1, N$, E, N, C
INPUT “DO YOU WANT TO CONTINUE”; CH$
LOOP WHILE UCASE$(CH$) = “Y”
CLOSE #1
END
148.A sequential data file “RECORD.DAT” and store Name, Address and Salary of employees. WAP to add some more records in the data file “RECODR.DAT”. Program should terminate with user choice.
OPEN “RECORD.DAT” FOR APPEND AS #1
DO
CLS
INPUT “ENTER NAME”; N$
INPUT “ENTER MARKS IN ENGLISH”; E
INPUT “ENTER MARKS IN NEPALI”; N
INPUT “ENTER MARKS IN COMPUTER”; C
WRITE #1, N$, E, N, C
INPUT “DO YOU WANT TO CONTINUE”; CH$
LOOP WHILE UCASE$(CH$) = “Y”
CLOSE #1
END 149.Create a data file to store the records of few employees having Name, Address, Post, Gender and Salary fields. [SEE 2073]
OPEN “std.rec” FOR OUTPUT AS #1
TOP:
CLS
INPUT “Enter Name”; N$
INPUT “Enter Address”; A$
INPUT “Enter Post”; P$
INPUT “Enter gender”; G$
INPUT “Enter Salary”; S
WRITE #1, N$, A$, P$, G$, S
INPUT “Do you want to continue”; CH$
IF UCASE$(CH$)=”Y” THEN GOTO TOP
CLOSE #1
END
150.Create a sequential data file ’Price.dat’ to store item name, quantity and Rate also calculate total amount(total=Quantity X Rate).Program should terminate according to the user’s choice.
OPEN “price.dat” FOR OUTPUT AS #1
TOP:
CLS
INPUT “Enter Item Name”; N$
INPUT “Enter Quantity”; Q
INPUT “Enter Rate”; R
T = Q * R
WRITE #1, N$, Q, R, T
INPUT “Do you want to continue”; CH$
IF CH$=”Y” OR CH$ = “y” THEN GOTO TOP
CLOSE #1
END 151.Create a sequential data file’post.dat’ to store name and marks of any three subjects also calculate total and percentages only for 15 students.
OPEN "post.dat" FOR OUTPUT AS #1
FOR I = 1 TO 15
INPUT "Enter Name"; n$
INPUT "Enter marks in any three subjects”; A, B, C
T = A + B + C
P = T / 3
WRITE #1, n$, A, B, C, T, P
NEXT I
CLOSE #1
END
152.Store SIDNO, name, address and Telephone number of five students and display the records on monitor in sequential data file “STDINFO”
OPEN "STDINFO.DAT" FOR OUTPUT AS #1
FOR I = 1 TO 5
INPUT "ENTER NAME"; N$
INPUT "ENTER ADDRESS"; A$
INPUT "ENTER TELEPHONE"; T#
WRITE #1, N$, A$, T#
NEXT I
CLOSE #1
OPEN "STDINFO.DAT" FOR INPUT AS #1
CLS
FOR I = 1 TO 5
INPUT #1, N$, A$, T#
PRINT N$, A$, T#
NEXT I
CLOSE #1
END 153.A sequential data file “Address.inf” contains serial no, name, address, telephone and email_id.WAP to record as many records as the user wants. The serial number should be generated automatically like 5001,5003,5005.
OPEN " Address.inf " FOR OUTPUT AS #1
DO
CLS
C = 5001
INPUT “ENTER NAME”; N$
INPUT “ENTER ADDRESS”; A$
INPUT “ENTER TELEPHONE”; T#
INPUT “ENTER EMAIL”; E$
WRITE #1, C, N$, A$, T$, E$
C = C + 2
INPUT “DO YOU WANT TO CONTINUE (Y / N)”; CH$
LOOP WHILE UCASE$(CH$) = “Y”
CLOSE #1
END
154.A Sequential data file called "SEE.DAT" has stored data under the field heading Symbol No., Name, English, Nepali, and Computer. Write a program to display all the information of those students whose marks in Computer is more than 80.
OPEN "SEE.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A, B$, C, D, E
IF E > 80 THEN PRINT A, B$, C, D, E
WEND
CLOSE #1
END 155.A sequential data file “STD.TXT” contains name and marks in three different subjects of some students. Write a program to display only fail student’s records assuming pass marks 40.
OPEN "STD.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, B$, C, D, E
IF C < 40 AND D <40 AND E <40 THEN PRINT B$, C, D, E
WEND
CLOSE #1
END
156.Write a program which reads records from the file ”Result.DAT” having the fields name, and marks of three different subjects and display only those records whose percentage is greater than 60 and less than 80. Also count the total number of records presenting in that data files.
OPEN "STD.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, B$, C, D, E
A=A+1
T=C+D+E
P=T/3
IF P > 60 AND P < 80 THEN PRINT B$, C, D, E
WEND
PRINT “TOTAL NO. OF RECORDS=”; A
CLOSE #1
END 157.Write a program to read all the records from the data file “STUDENT.TXT” and display all the records where the fields name are unknown.
OPEN "STUDENT.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
LINE INPUT #1, A$
PRINT A$
WEND
CLOSE #1
END
158.A data file "pabson.txt" contains the records composed of the fields like school, principal, address, contact. Write a program in Qbasic to display records of the schools located in either Kathmandu or Palpa
OPEN "PABSON.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A$, B$, C$, D
IF UCASE$(C$) = “KATHMANDU” OR UCASE$(C$) = “PALPA” THEN PRINT A$, B$, C$, D
WEND
CLOSE #1
END 159.A data file “INFO.DAT” has numerous records in it with name, address age, and telephone numbers in it. Write a program to read all the records and print those with address “NEPAL” and age >15
OPEN "INFO.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A$, B$, C, D
IF UCASE$(B$) = “NEPAL” AND C >15 THEN PRINT A$, B$, C, D
WEND
CLOSE #1
END
160.A sequential data file called 'ADDRESS.DAT' contains NAME, AGE, CITY and TELEPHONE fields. Write a program to display all the contents of that data file.
OPEN "ADDRESS.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A$, B, C$, D
PRINT A$, B, C$, D
WEND
CLOSE #1
END
161.A data file “lib.txt” consists of book’s name, author’s name and price of books. Write a program to count and display the total number of records present in the file.
OPEN "LIB.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A$, B$, C
D = D + 1
WEND
PRINT “TOTAL NUMBER OF RECORDS=”; D
CLOSE #1
END
162.Write a program in QBASIC to open a sequential data file “EMP.DAT”, which contains employees records: Name, address and phone number and display all the records as well as total number of records stored in the file.
OPEN "LIB.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, A$, B$, C
PRINT A$, B$, C
D = D + 1
WEND
PRINT “TOTAL NUMBER OF RECORDS=”; D
CLOSE #1
END 163.A sequential data file named “nabil.txt” contains record of clients of a bank including depositor’s name, deposited amount, time and rate of interest. Wap to display detail of all depositors including simple interest.
OPEN "NABIL.TXT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, P, T, R
I=P*T*R/100
PRINT A$, B$, C, I
WEND
CLOSE #1
END
164.A sequential data file “SALARY.DAT” contains the information, Employee-Code, Employee-Name, Post, Basic-Salary. Write a program to display those records whose Basic-salary is between 10000 to 15000 and Post is ‘OFFICER’.
OPEN "SALARY.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, E,, N$, P$, S
IF UCASE$(P$) = “OFFICER” AND S >= 10000 AND S>= 15000 THEN PRINT A$, B$, C, D
WEND
CLOSE #1
END 165.A data file name “EMP.DAT”, contains number of records having fields name, post and salary. Write a program to count total number of “Manager” in the data file. (hint: Manager is a post)
OPEN "EMP.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, P$, S
IF UCASE$(P$) = “MANAGER” THEN PRINT C = C + 1
WEND
PRINT “TOTAL NO.OF MANAGERS ARE”; C
CLOSE #1
END
166.A sequential data file “emp.dat” contains name, post and salary fields of information about employees. Write a program to display all the information of employees along with tax amount (also tax is 15% of salary).
OPEN "EMP.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, P$, S
T = 15 / 100 * S
PRINT N$, P$, S, T
WEND
CLOSE #1
END 167.A data file “Salary.Dat” contains the information of employee regarding their name, post and salary. Write a program to display all the information of employee whose salary is greater than 15000 and less than 40000.
OPEN "EMP.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, P$, S
IF S >= 15000 AND S <= 40000 THEN PRINT N$, P$, S
WEND
CLOSE #1
END
168.Write a program that reads the ”INFO.DAT” file that has several record such as name, address, gender, post, and salary .The program display those record whose sex is male and salary more than 10,000 and also the program counts the total number of records in that file.
OPEN "INFO.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, A$, G$, P$, S
C = C + 1
IF UCASE$(G$)=”M” AND S >= 10000 THEN PRINT N$, A$, G$, P$, S
WEND
PRINT “TOTAL NUMBER OF RECORDS=”; C
CLOSE #1
END 169.A sequential data file’post.dat’ has few records related to name, address, salary.WAP to display the records whose address begins with ‘S’ or ‘D’
OPEN "POST.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, P$, S
A$ = UCASE$(LEFT$(N$,1))
IF A$ = “S” OR A$ = “D” THEN PRINT N$, P$, S
WEND
CLOSE #1
END
170.Write a program to open a data file “record.dat” that contains name, address, date of birth, email and telephone number of some employees. Now display all those records whose date of birth is in current month.
OPEN "birth.dat" FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, n$, d$, a$
b$ = LEFT$(DATE$, 2)
c = VAL(b$)
e$ = LEFT$(d$, 2)
f = VAL(e$)
IF c = f THEN PRINT n$, d$, a$
WEND
CLOSE #1
END
171.A sequential data file “Record.dat” has few records related to name, address, post and DOB(mm/dd/yyyy). WAP to display the records of all those who were born between 1971 to 1999.
OPEN "RECORD.dat" FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, n$, a$, p$, d$
d$ = RIGHT$(d$, 4)
c = VAL(b$)
IF c >= 1971 and c<=1999 THEN PRINT n$, d$, a$
WEND
CLOSE #1
END
172.Write a Qbasic program that read the "EMP.DAT" file with Name, Address, Post and Salary columns from E: drive that has 500 records of employees and displays only its last 50 records.
OPEN "E:\EMP.DAT" FOR INPUT AS #1
CLS
FOR i = 1 TO 500
INPUT #1, n$, a$, p$, s
IF i >= 450 AND i <= 500 THEN PRINT n$, a$, p$, s
NEXT i
CLOSE #1
END 173.A sequential data file has 100 records having field name, class and roll number. Write a program to display from 50th to 60th records.
OPEN "ABC.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, C, R
D = D + 1
IF D >= 50 AND D <= 60 THEN PRINT N$, C, R
WEND
CLOSE #1
END
174.Write a program to display the first 10 records from a file named “resource.dat” having fields name, phone and email.
OPEN "RESOURCE.DAT" FOR INPUT AS #1
CLS
FOR I = 1 TO 10
INPUT #1, N$, C, R
PRINT N$, C, R
NEXT I
CLOSE #1
END
175.A data file named “EMP.DAT” contains some records with the fields Code, Name, Post and Salary. Write a program to print odd position records of the data file.
OPEN "EMP.DAT" FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, C, N$, P$, S
D = D + 1
IF MOD 2 = 1 THEN PRINT C, N$, P$, S
WEND
CLOSE #1
END
176.A sequential data file named “abc.dat” has several records having fields name, roll and class. Write a program to copy all the records of class 10 into a newly created file new.dat.
OPEN "ABC.DAT" FOR INPUT AS #1
OPEN "NEW.DAT" FOR OUTPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, R, C
IF C = 10 THEN WRITE #2, N$, R, C
WEND
CLOSE #1, #2
END
177.A data file named “record.dat” contains name, age and salary for n number of persons. Write a program to input a name to search data from a data file. If the data is not found, then display the message “Data not found in the list”.
OPEN “RECORD.DAT” FOR INPUT AS #1
CLS
INPUT “Enter name to be searched”; S$
FLAG=0
WHILE NOT EOF(1)
INPUT #1, N$, A$, S
IF UCASE$(S$)=UCASE$(N$) THEN
PRINT N$, A$, S
FLAG=1
END IF
WEND
IF FLAG=0 THEN PRINT “Data not found”
CLOSE #1
END
178.A sequential data file 'Student.dat' contains registration number, student name, address and date of birth of some students. Write a program that asks a user to input a registration number and displays the record of the particular registration if present.
OPEN “STUDENT.DAT” FOR INPUT AS #1
CLS
INPUT “Enter registration no. to be searched”; S
FLAG=0
WHILE NOT EOF(1)
INPUT #1, R, N$, A$, D$
IF S = R THEN
PRINT R, N$, A$, D$
FLAG=1
END IF
WEND
IF FLAG=0 THEN PRINT “Data not found”
CLOSE #1
END 179.WAP that asks a post of the employee and displays his/her records from the sequential data file “XYZ.REC” having fields Name, Post, Dept and Salary.
OPEN “XYZ.REC” FOR INPUT AS #1
CLS
INPUT “Enter post to be searched”; S$
FLAG=0
WHILE NOT EOF(1)
INPUT #1, N$, P$, D$, S
IF UCASE$(S$)=UCASE$(P$) THEN
PRINT N$, P$, D$, S
FLAG=1
END IF
WEND
IF FLAG=0 THEN PRINT “Data not found”
CLOSE #1
END
180.Delete some records from “neps.dat” file where computer ask user to enter the record, which is to be deleted. (Fields are name, address, and telephone number)
OPEN “NEPS.DAT” FOR INPUT AS #1
OPEN “TEMP.DAT” FOR OUTPUT AS #1
CLS
INPUT “Enter name which is to be deleted”; D$
WHILE NOT EOF(1)
INPUT #1, N$, A$, T#
IF UCASE$(D$)<>UCASE$(N$) THEN
WRITE #2, N$, A$, T#
ELSE
PRINT “Deleted data=”; N$, A$, T#
END IF
WEND
CLOSE #1, #2
KILL “NEPS.DAT”
NAME “TEMP.DAT” AS “NEPS.DAT”
END
----------------------------------------------------------------------------
182.A sequential data file “marks.dat” contains information such as student’s name, marks obtained in math, science and computer. Write a program that increase the marks of computer by 10 of those student who secured less than 40
OPEN "D:\PATIENT.DAT" FOR INPUT AS #1
OPEN "d:\TEMP.DAT" FOR OUTPUT AS #2
CLS
FLAG = 0
WHILE NOT EOF(1)
INPUT #1, N$, A, B, C
IF C > 40 THEN
WRITE #2, N$, A, B, C
ELSE
C = C + 10
WRITE #2, N$, A, B, C
FLAG = 1
END IF
WEND
IF FLAG = 0 THEN
PRINT "DATA NOT FOUND"
ELSE
PRINT "DATA EDITED"
END IF
CLOSE
KILL "D:\PATIENT.DAT"
NAME "D:\TEMP.DAT" AS "D:\PATIENT.DAT"
END 181.A sequential data file “RECORD.DAT” contains different records under fields: name rollno., name, address and percentage. Write a program to edit a record and display both edited and unedited records on the screen to compare them side by side.
OPEN "D:\RECORD" FOR INPUT AS #1
OPEN "d:\TEMP.DAT" FOR OUTPUT AS #2
CLS
INPUT "ENTER ROLL NUMBER TO EDIT DATA"; E
FLAG = 0
WHILE NOT EOF(1)
INPUT #1, R, N$, A$, P
IF E <> R THEN
WRITE #2, R, N$, A$, P
ELSE
INPUT "ENTER ROLL NUMBER"; ER
INPUT "ENTER NAME"; EN$
INPUT "ENTER ADDRESS"; EA$
INPUT "ENTER PERCENTAGE"; EP
WRITE #2, ER, EN$, EA$, EP
FLAG = 1
END IF
WEND
IF FLAG = 0 THEN
PRINT "DATA NOT FOUND"
ELSE
PRINT "NON EDITED DATA"
PRINT "ROLL NUMBER= "; R
PRINT "NAME= "; N$
PRINT "ADDRESS= "; A$
PRINT "PERCENTAGE= "; P
PRINT "---------------"
PRINT "EDITED DATA"
PRINT "ROLL NUMBER: "; ER
PRINT "NAME: "; EN$
PRINT "ADDRESS: "; EA$
PRINT "PERCENTAGE: "; EP
END IF
CLOSE
KILL "D:\SALARY.DAT"
NAME "D:\TEMP.DAT" AS "D:\SALARY.DAT"
END
No comments:
Post a Comment