Tenset
Supplementary
Exam 2065
Jaya Ganeshya
Group A
COMPUTER
FUNDAMENTALS (22 marks)
1. Answer the
following questions:
a)
Explain about network topology. Write any two advantages of computer
networking.
Ans: The cabling structure of computer in local area is known as network topology or LAN topology.
Any
two advantages of computer networking are :
i.
Computer in network share different software packages.
ii.
Communication made by computer network is very cheap.
b)
What is internet? Write any two advantages of Internet.
Ans: Internet is a world's largest computer network connecting millions or billions of computer together in a common protocol TCP/IP for communication.
Any
two advantages of internet are as follows:
i.
The internet provides very fast and cheap communication.
ii.
It is easy to access information of different governments and countries.
c)
What is antivirus software? List any two antivirus software.
Ans: Those
software which are designed to detect and remove viruses from the computer
system to ensure a virus free environment is known as anti-virus software.
Any
two antivirus software are:
i.
Norton Antivirus
ii.
McAfee
d)
What is multimedia? Write any two applications of it.
Ans: The
integration of several forms of media like audio, video, animation, etc. to
present information in more interactive and understandable way is known as
multimedia.
Any
two applications of it are as follows:
i. Adding
special effects in movies:
Multimedia
is used in movies to add special effects to make movie more realistic and
interesting.
ii. Preparing
presentation:
Multimedia
is used in preparing presentation which helps to convey information in more
interesting and interactive way.
e)
What do you mean by software security? Write any two methods to protect the computer
software.
Ans: The
security given to various software or data from being lost or damaged due to
accidental or intentional harm is known as software security.
Any
two methods to protect the computer software are:
i.
Defragmentation
ii.
Scan disk
3. Match the following:
Group
A Group
B
i)
McAfee a)
Supplies continuous power
ii)
UPS b)
Internet protocol
iii) Web Browser c)
Antivirus software
iv)
TCP/IP d)
Internet explorer
e)
Computer virus
Ans:
Group
A Group
B
i) McAfee - a)
Antivirus software
ii)
UPS - b)
Supplies continuous power
iii) Web
Browser - c)
Internet explorer
iv)
TCP/IP - d)
Internet Protocol
4. State whether the statements are True or False
a) MODEM is necessary to access the
internet. False
b) Fiber optics use light to carry a data
signal through cable. True
c) Multimedia does not include animation. False
d) Cyber ethics are moral principles that make
aware to the computer users. True
5. Give appropriate technical terms:
a) Network of networks.
Ans:
Internet
b) A secret code that gives the user to access
particular program and system.
Ans:
Password
c) Use of Internet to buy and sell goods and
services.
Ans:
E-commerce
d) The rules and regulations to systematize the
computer related technology.
Ans: Cyber
law
6. Give the full form:
a)
Kbps -
Kilobits per second
b) NIC - Network Interface
Card
c) MODEM- Modulator Demodulator
d) FTP - File Transfer Protocol
Group B
DATABASE MANAGEMENT (10 marks)
7. Answer the
following
a)
Define data and database.
Ans: Data can
be numbers, letters or symbols representing facts and figures that may or may
not give complete sense.
Database
is a collection of related and organized information that is used to store,
organize and extract data.
b)
Name any four data types that can be defined in MS-ACCESS.
Ans: Any four
data types that can be defined in MS-Access are as follows:
i.
Number
ii.
Text
iii.
Memo
iv.
Auto number
c)
What is a form? Give its importance.
Ans: Form is
an object of MS-Access that provides user friendly interface to enter data in a
table or multiple linked tables.
Importance
of form are as follows:
i.
It provides an interactive platform for input if data into the database.
ii.
It helps to display data in more presentable form than a datasheet can.
8. State whether
the following statements are true or false.
a)
A query is used to select fields and records from many tables. True
b)
MS-ACCESS is a spread-sheet software. False
c)
Index decreases the speed of the query and short operations. False
d)
The data in primary key field need to be unique and not null. True
9. Match the
following:
Group
A Group
B
i)
MS-ACCESS a)
analyze and present data in a printed format
ii)
Data
update b)
Query
iii)
Field c) a piece of
information related to someone or something
iv)
Report d)
Database management software
e)
collection of related fields.
Ans:
Group
A Group
B
i)
MS-ACCESS - a)
Database management software
ii)
Data
update - b)
Query
iii)
Field -c) a piece of information
related to someone or something
iv)
Report - d)
analyze and present data in a printed format
Group C
Programming(18 marks)
10. a)
Define modular programming.
Ans: Modular
programming is a technique in which a program is divided into different small
manageable program blocks, which are called modules or sub programs.
b)
Name any two data types used in C language.
Ans: Any two
data types of C language are:
char
int
c)
Give the functions of NAME and CLOSE statements.
Ans:
NAME: The function
of NAME statement is to rename a file on a diskette
CLOSE: The function
of CLOSE statement is to close one or all open files.
11. Re-write the
given program correcting the bugs:
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( )
Ans:
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
12. Write the
output of the following program.
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)
SI = (p*t*r)/100
Interest=SI
END
FUNCTION
13.
Analyse the program given below and answer the questions:
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
a)
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 Will be 100.
Ans: The Output Will be 100.
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.
14.a) Write a
program using FUNCTION….END FUNCTION to get a word from the user and print the
word in the reverse order.
Ans:
DECLARE
FUNCTION REV$(S$)
CLS
INPUT
“Enter any word”; S$
PRINT
“The reverse word 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
b) Write a
program using SUB….END SUB to get radius of the circle and display the area.
Ans:
DECLARE
SUB AREA(R)
CLS
CONST
PI=3.1416
INPUT
”Enter radius”; R
CALL
AREA(R)
END
SUB
AREA(R)
A=PI*R^2
PRINT
“The area of circle”; A
END
c) A sequential
data file called “Marks.dat” contains roll number, name, English, Nepali, and
Maths field. Write a program to display all the content of the data file.
Ans:
OPEN
“MARKS.DAT” FOR INPUT AS #1
CLS
WHILE
NOT EOF(1)
INPUT
#1, RN, N$, E, N, M
PRINT
RN, N$, E, N, M
WEND
CLOSE
#1
END
SLC
Examination-2065(2009)
Jaya Ganeshya
Computer
Fundamental (22 marks)
1. Answer the following questions:
a. Define star topology with figure.
a. Define star topology with figure.
Ans: The topology in which
all computers or the network devices are connected through a central device in
the shape of star structure is called star topology.
Diagram of star topology
b. List out any four
services of internet.
Ans: Any four services of
internet are
i) E-mail (Electronic mail)
ii) FTP (File Transfer Protocol)
iii) IRC (internet Relay Chat)
iv) E-commerce
ii) FTP (File Transfer Protocol)
iii) IRC (internet Relay Chat)
iv) E-commerce
c. Define Computer Ethics.
Ans: Computer ethics is the
set of moral principles or code of conducts that should be followed by computer
user.
d. Write down two measures of each to protect computer hardware and software.
Ans: Any two hardware
security measures are:
ii) Insurance Policy
ii) Power Regulator Device
ii) Power Regulator Device
Any two software security
measures are:
i) Backup
iv) Password
i) Backup
iv) Password
e. What is anti-virus? Write down any two examples of anti-virus software.
Ans: Antivirus software is software designed to detect and remove virus from computer system to ensure virus free environment.
Any two examples of
antivirus software are:
i) Kaspersky ii) NOD32
i) Kaspersky ii) NOD32
3. Match the following:
Group A Group B
a) Server i) HTTP
b) Node ii) Work station
c) Protocol iii) Main computer
d) Coaxial cable iv)Repeater
v) Communication Media
Group A Group B
a) Server i) HTTP
b) Node ii) Work station
c) Protocol iii) Main computer
d) Coaxial cable iv)Repeater
v) Communication Media
Answers
Group
A Group
B
a) Server Main computer
b) Node Work station
a) Server Main computer
b) Node Work station
c)
Protocol HTTP
d) Coaxial
cable Communication
Media
4. Select the best answer:
a)Which refers to the communication media?
i) UTP cable ii) Fiber optic cable iii) Satellite iv) All of the above
a)Which refers to the communication media?
i) UTP cable ii) Fiber optic cable iii) Satellite iv) All of the above
All
of the above
b) Which is the correct Email ID?
i) Yahoo@ramesh ii) Ramesh@yahoo.com
iii) @ramesh.yahoo.com iv) None of the above
c) Route of virus transmission:
i) Pen drive ii) Microphone
iii) Printer iv) Mouse
Pen
drive
d) Main component of multimedia is:
i) Floppy disk ii) Floppy drive
iii) Sound card iv) Magnetic tape
Sound
card
5) Give appropriate technical terms:
a) A computer network limited within a room.
LAN (Local Area Network)
b) A program that destroys other program
Computer Virus
c) Law regarding internet (or Legal issues of Cyber Space).
Cyber Law
d) Buying and selling products and services online.
E-Commerce
6. Write the full forms:
a) UPS = Uninterruptible
Power Supply
b)
TCP = Transmission
Control Protocol
c)
STP = Shielded
Twisted Pair
d)
NIC = Network
Interface Card
Group B- Database (10 marks)
7. Answer the following question:
a) What is database?
a) What is database?
Ans:Database is a collection
of related and organized information that can be used for different purpose.
b) While designing table structure which data types are suitable to store information about teacher’s name, address, salary, and date of birth.
While designing table
structure the data types are suitable to store information about
teacher’s name = Text
Address = Memo
Salary = currency
Date of birth = Date / Time
c) Write down any two advantages of Query.
Any two importance of query
are:
a. It
allows user to make calculations and change data in automated fashion.
b. It
provides option to delete all the unwanted data matching certain criteria.
8. Select the best answer:
a) …………… is not the data type of MS-Access.
i) Number ii) Text
iii) Memo iv) Form
a) …………… is not the data type of MS-Access.
i) Number ii) Text
iii) Memo iv) Form
Form
b) …………… is the DBMS.
i) Fox-Pro ii) MS-Excel
iii) Lotus-123 iv) All of the above
Fox-pro
c) Primary key does not accept ……………
i) Text ii) Number
iii) Null value iv) None of the above
Null
value
d) In MS-Access we enter data using ………….
i) Form ii) Table
iii) Report iv) Both (i) &(ii)
Both
(i) &(ii)
9. Match the following:
Group A Group B
a) Query i)Printed format
b) Form ii) Stored data
c) Table iii) Allows view, edit, input data
d) Report iv) Extracts the selected record for view
v) DBMS
Answers
Group
A Group
B
a) Query Extracts the selected record for view
b) Form Allows view, edit, input data
c) Table Stores data
d) Report Printed format
a) Query Extracts the selected record for view
b) Form Allows view, edit, input data
c) Table Stores data
d) Report Printed format
Group C-Programming
(18 marks)
10. a) Write down one
difference between function and sub procedure.
Ans: One difference between
function and sub procedure is
SUB-procedure
|
FUNCTION-procedure
|
SUB-procedure does not
return value.
|
FUNCTION-procedure must
return a value.
|
b) List any two data type
used in C language.
Ans: Any two data type used
in C language are char and int
c) Write down the functions of:
i) RMDIR
Ans: It is used to
remove or delete only the sub directories from a disk. It can remove only empty
sub directories.
ii)
NAME
Ans: The NAME statement
renames a file on a disk.
11.Write the output of:
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
12. Re-write the following
program after correcting:
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
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
Debuged Program
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
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
13. Study the following program and answer the following question:
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 used in the above program is xyz.
b) How many times the function will be called in the above program?
Ans: The function will be
called five times in the above program.
14. a) Write a program to store records regarding the information of
Book number, Book’s name and Writer’s name in a sequential data file called
“Library.dat”.
OPEN “Library.dat” FOR
OUTPUT AS #1
DO
CLS
INPUT “ENTER BOOK’S NUMBER”;
BN
INPUT “ENTER BOOK’S NAME”;
B$
INPUT “ENTER WRITER’S NAME”;
N$
WRITE #1, BN, B$, N$
INPUT “DO YOU WANT TO
CONTINUE”; CH$
LOOP WHILE UCASE$(CH$) = “Y”
CLOSE #1
END
b) Using FUNCTION……END 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, TIME AND ACCELERATION”; U, T, A
PRINT “DISTANCE
TRAVELLED BY BODY”; DISTANCE (U, T, A)
END
FUNCTION
DISTANCE (U, T, A)
DISTANCE
= U*T+1/2*A*T^2
END
FUNCTION
c) Using SUB……….END sub, 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
Supplementary Examination 2066
Jaya Ganeshya
Group A
Computer Fundamentals (22 marks)
1. Answer
the following questions:
a) What is bandwidth?
Ans: The data handling capacity of a communication system
is known as bandwidth.
b) What is network topology?
Ans: The arrangement or connection pattern of computers or nodes
and other devices of the network is known as network topology.
c) How can multimedia help in education?
Ans: Multimedia technology is very much useful in
education. It helps to present the information about various topics in more
interesting and interactive way which makes the learner easy to understand. It
helps to give better ideas and concept to the students with good vocabulary.
d) Write any four safety measures to protect computer
form virus.
Ans: Any four safety measures to protect computer from
viruses are:
i. Write-protect your floppy disk when using them on
other computers.
ii. Do not install pirated software, especially computer
games.
iii. Always scan files downloaded from the internet or
transferred over the network before executing them.
i v. Do not interchange internal disk among the computers.
e) What is computer hardware and software security?
Ans: The security given to various hardware tools and
equipment from being lost or damaged due to accidental or intentional harm is
known as hardware security. For e.g: protection from theft, power protection
device, etc.
The security given to various software and data from
being lost or damaged due to accidental or intentional harm is known as
software security. For e.g: defragmentation, scan disk, etc.
3. Match the following
Group
A Group
B
i)
Bandwidth a)
ISP
ii)
Internet b)
FAT
iii) Network c)
bps
iv) Software security d) NAV
e)
NIC
Ans:
Group
A Group
B
i)
Bandwidth - a)
bps
ii)
Internet - b)
ISP
iii)
Network - c)
NIC
iv) Software
security - d)
NAV
4. Choose the correct answer:
a) Which is NOT a guided media?
i) UTP Cable ii) STP
Cable
iii) Satellite iv) Fiber Optics
iii) Satellite iv) Fiber Optics
Ans:
Satellite
b) Which device is necessary to operate internet?
i) CD-ROM ii)
ISP
iii) MODEM iv) All of the above
iii) MODEM iv) All of the above
Ans:
MODEM
c)Modem converts
i) Sound into digital ii)
Digital into sound
iii) Both i) and ii) iv) None
iii) Both i) and ii) iv) None
Ans:
Both i) and ii)
d) Which is not an internet service?
i)
e-mail ii)
e-telephone
iii)e-fax iv) e-commerce
iii)e-fax iv) e-commerce
Ans:
e-telephone
5. Write the technical terms of the following:
a) Making extra copies of data or program.
5. Write the technical terms of the following:
a) Making extra copies of data or program.
Ans:
Backup
b) A card used to connect network cable to computer.
Ans: NIC
(Network Interface Card)
c) Device used for power protection.
Ans:
Volt guard
d) Program used to detect and eliminate computer
virus.
Ans: Anti-virus
6. Write the full forms of:
a) WWW- World Wide Web
6. Write the full forms of:
a) WWW- World Wide Web
b) UPS- Uninterruptible Power
Supply
c) NOS- Network Interface Card
d) UTP- Unshielded Twisted Pair
Group B
Database (10 marks)
Database (10 marks)
7. Answer the following questions:
a) Define database.
Ans: Database is a collection of related and organized
information that is used to store, organize and extract data.
b) Write any four data type used in MS-Access.
Ans: Any four data types used in MS-Access are as follows:
i. Number
ii. Text
iii. Memo
iv. Autonumber
c) What is query?
Ans: Query is an object of MS-Access which allows selecting
specific data from one or more tables.
8. State whether the following statements are true or false:
a) Primary key does not accept null value. True
b) The extension of database file created by MS-Access is .BDF. False
c) Memo data type cannot be indexed. True
d) The default size of text data type is 50.True
9. Match the following:
Group A Group B
a) OLE i) Formatted output
b) Primary key ii) Interface
c) Form iii) 64,000 characters
d) Report iv) Unique Field
v) Picture
8. State whether the following statements are true or false:
a) Primary key does not accept null value. True
b) The extension of database file created by MS-Access is .BDF. False
c) Memo data type cannot be indexed. True
d) The default size of text data type is 50.True
9. Match the following:
Group A Group B
a) OLE i) Formatted output
b) Primary key ii) Interface
c) Form iii) 64,000 characters
d) Report iv) Unique Field
v) Picture
Ans:
Group
A Group
B
a)
OLE - Picture
b) Primary key - Unique Field
c) Form - Interface
d) Report - Formatted output
b) Primary key - Unique Field
c) Form - Interface
d) Report - Formatted output
Group C
Programming (18 marks)
Programming (18 marks)
10. a) What
is user defined function?
Ans: The function which is defined by the user according to
the need is known as user-defined function.
b) List any two data types
used in C language.
Ans: The data types used in C language are:
· Char
· Int
c) Write down the function
of the following statements:
i) KILL ii) FILES
i) KILL ii) FILES
Ans: The function of:
i. KILL: It deletes the file or files from the specified
drive and directory.
ii. FILES: It displays all the files of the current
subdirectory or specified sub directory.
11. Write the output of the given program: 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
CALL Result
END
SUB Result
For I = 1 to 9 STEP 2
Sum=Sum +I^2
Next I
PRINT Sum
END SUB
12. Rewrite the following program after correcting the
bugs:
REM to store Name, post and salary
OPENEMP.DOCFOROUTAS#1
INPUT “Enter Name”; N
INPUT “Enter post”; P$
INPUT “Enter salary”; S
WRITE #2, N$,P$,S
CLOSE #1
END
OPENEMP.DOCFOROUTAS#1
INPUT “Enter Name”; N
INPUT “Enter post”; P$
INPUT “Enter salary”; S
WRITE #2, N$,P$,S
CLOSE #1
END
Ans:
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
13. Study the following program and answer the following questions:
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
13. Study the following program and answer the following questions:
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
a) List the string Library functions used in the above program.
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
a) List the string Library functions used in the above program.
Ans: The string Library functions used in the above program
are as follows:
· LEN
· MID$
· UCASE$
b) 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$).
14. a) Write a program using FUNCTION…..END FUNCTION to find the average of any two numbers given by the user.
14. a) Write a program using FUNCTION…..END FUNCTION to find the average of any two numbers given by the user.
Ans:
DECALRE FUNCTION AVE(A,B)
CLS
INPUT “Enter any two numbers”; A,B
PRINT “The average of two numbers=”; AVE(A,B)
END
FUNCTION AVE(A,B)
AV=(A+B)/2
AVE=AV
END FUNCTION
b) Write a program using SUB……END SUB to check whether
the number given by the user is positive or negative.
Ans:
DECLARE SUB CHECK(N)
CLS
INPUT ”Enter any number”; N
CALL CHECK(N)
END
SUB CHECK(N)
IF N>0 THEN
PRINT N;”is positive number”
ELSEIF N<0 THEN
PRINT N;”is negative number”
END IF
END SUB
c) 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.
Ans:
OPEN “LIB.TXT” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, N$, A$, P
C=C+1
WEND
PRINT “The total number of records=”; C
CLOSE #1
END
SLC
Examination-2066(2010)
Jaya Ganeshya
Computer
Fundamental (22 marks)
1. Answer the following question:
a) What is computer network?
a) What is computer network?
Ans: Computer network means
two or more computers connected with each other to share data, hardware,
software and other resources.
b) What is internet?
Ans: Internet is an interconnection of several thousands of computers of different types belonging to the various networks all over the world.
Ans: Internet is an interconnection of several thousands of computers of different types belonging to the various networks all over the world.
c) Write any four preventive
measures to protect computer system from virus infection.
Ans: Any four preventive measures to protect computer system from virus infection are:
i) Write protect your floppy disks when using them on other computers.
ii) Scan the mail or unknown files of internet before opening in your computers.
iii) Use a good antivirus program to scan floppy disk, CD, etc. before copying.
iv) Don’t install pirated software, especially computer games.
Ans: Any four preventive measures to protect computer system from virus infection are:
i) Write protect your floppy disks when using them on other computers.
ii) Scan the mail or unknown files of internet before opening in your computers.
iii) Use a good antivirus program to scan floppy disk, CD, etc. before copying.
iv) Don’t install pirated software, especially computer games.
d) Write any two software
used for multimedia.
Ans: Any two software used for multimedia are:
Ans: Any two software used for multimedia are:
i) Windows Media Player
ii) VLC Media Player
e) What is hardware
security?
Ans: The security
given to the various hardware tools or equipment from being lost or damaged due
to accidental or intentional harm is hardware security.
3. Match the following:
Group A Group B
a) T-connector i)Network
b) Bridge ii) Power protection
c) CD-ROM iii) Coaxial cable
d) Spike Guard iv)Multimedia component
v)Virus scanning
Answers
Group A Group B
a) T-connector i)Network
b) Bridge ii) Power protection
c) CD-ROM iii) Coaxial cable
d) Spike Guard iv)Multimedia component
v)Virus scanning
Answers
Group
A Group
B
a) T-connector Coaxial cable
b) Bridge Network
a) T-connector Coaxial cable
b) Bridge Network
c)
CD-ROM Multimedia
component
d) Spike
Guard Power
protection
4. Select the best answer:
a) Which one is not a network topology?
i) Star ii) Ring
iii) Client / Server iv) Bus
a) Which one is not a network topology?
i) Star ii) Ring
iii) Client / Server iv) Bus
Client/Server
b) When was cyber law introduced in Nepal?
i) 2061 B.S. ii) 2062 B.S.
iii) 2007 B.S. iv) 2016 B.S.
2061 B.S.
c) Multimedia technology is used in ………
i) Education ii) Business
iii) Health care iv) All of the above
All of the above
d) Boot sector virus infects ……..
i) System file ii) Master boot record
iii) Application software iv) Document file
Master boot record
5. Give appropriate technical terms:
a) Rules and format to accept and transfer data in the computer network.
Protocol
b) Moral rules to be followed by computer and other professionals.
b) Moral rules to be followed by computer and other professionals.
Computer ethics
c) Making an extra copy of data and software.
c) Making an extra copy of data and software.
Backup
d) A virus that corrupts system files of operating system.
d) A virus that corrupts system files of operating system.
File Infector virus
6. Write the full forms:
6. Write the full forms:
a)WWW = World
Wide Web
b)MAN = Metropolitan
Area Network
c)OS = Operating
System
d)NIC = Network
Interface Card
Group B-Database (10 marks)
7. Answer the following
question:
a) What is DBMS? Write any two examples of DBMS software.
a) What is DBMS? Write any two examples of DBMS software.
Ans: DBMS is a software
which is used to manage data, manipulate them and provide the information.
Examples of DBMS are MS-Access and Oracle.
b) List any four data types
used in MS-Access.
Ans: Any four data types used in Ms-Access are:
Ans: Any four data types used in Ms-Access are:
i)
Text
ii)
Memo
iii)
Number
iv)
Yes/No
c) What is form? Write any
two advantages of using form.
Ans: Form is an object of MS-Access which provides a user friendly interface to enter data in a table or multiple linked tables.
Ans: Form is an object of MS-Access which provides a user friendly interface to enter data in a table or multiple linked tables.
Any two advantages of using
form are:
i. It
helps to display data in more presentable form than a datasheet can.
ii. It
provides an interactive platform for input of data into the database.
8. Select the best answer:
a) Date/Time occupies ………. bytes of memory.
i) 4 ii) 2 iii) 8 iv) 16
8
b) The extension of database file in MS-Access is……….
i) DBF ii) DBM
iii) MDB iv)DMB
MDB
c) The object of MS-Access that is used to generate hard copy of records.
i) Query ii) Table
iii) Form iv) Report
Report
d) A ………….. Key uniquely identifies a record.
i) Primary ii) Foreign
iii) Composite iv) None
Primary
9. Match the following:
Group A Group B
a) Default value i) 255 Characters
b) Fox Pro ii) Column Name
c) Text iii) DBMS
d) Field iv)Field Properties
v) Search fast
Answer
Group A Group B
a) Default value Field Properties
b) Fox Pro DBMS
Group A Group B
a) Default value Field Properties
b) Fox Pro DBMS
c)
Text 255
Characters
d) Field Column Name
d) Field Column Name
Group C-Programming
10. a) What is modular
program?
Modular program is a
technique used to divide program into many small, manageable, logical and
functional modules or blocks.
b) Write any two advantages
of Structured programming.
Ans: Any two advantages of Structured programming
Ans: Any two advantages of Structured programming
i) It is a high level
language with some features of low level language.
ii) It is mostly used to prepare system software.
ii) It is mostly used to prepare system software.
c) Write the function of
following statement:
i) Files
Ans: The FILES statement
displays the files of the current sub directory or specified sub directory.
ii) KILL
Ans: The KILL statement deletes the file or files from the specified drive and directory.
Ans: The KILL statement deletes the file or files from the specified drive and directory.
11. Debug the given program:
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 SUB Fibonic
END
SUB Fibonic
a=1
b=1
FOR x=1 to 10
DISPLAY a;
a=a+b
b=a+b
END Fibonic
Debugged program
DECLARE SUB Fibonic( )
REM *Fibonic series*
CALL FibonicEND
SUB Fibonic
a=1
b=1
FOR x=1 to 10
PRINT a;
a=a+b
b=a+b
DECLARE SUB Fibonic( )
REM *Fibonic series*
CALL FibonicEND
SUB Fibonic
a=1
b=1
FOR x=1 to 10
PRINT a;
a=a+b
b=a+b
NEXT x
END SUB
END SUB
12. Write the output of the
following program.
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
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
13. Read the given program
and answer the following questions:
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
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 used in the above program is Num.
ii) List out the
mathematical function (Library function) used in the above program.
Ans: The mathematical
function (Library function) used in the above program is INT ( ).
14. i) Write a program using Function Module to calculate and print the volume of a box.
14. i) Write a program using Function Module to calculate and print the volume of a box.
DECLARE
FUNCTION VOLUME(L, B, H)
CLS
INPUT
“ENTER LENGTH, BREADTH AND HEIGHT”; L, B, H
PRINT
“VOLUME OF BOX”; VOLUME(L, B, H)
END
FUNCTION
VOLUME (L, B, H)
VOLUME
= L*B*H
END
FUNCTION
ii) Write a program to declare SUB procedure to print only the vowels from a given word.
DECLARE SUB DISPV (S$)
CLS
INPUT "ENTER ANY
WORD"; 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
PRINT B$
END IF
NEXT I
END SUB
iii) Write a program to create a sequential data file “Employee.Dat” to store employees’ name, address, age, gender and salary.
OPEN “Employee.dat” FOR
OUTPUT AS #1
DO
CLS
INPUT “ENTER EMPLOYEE’S
NAME”; N$
INPUT “ENTER ADDRESS”; A$
INPUT “ENTER AGE”; A
INPUT “ENTER GENDER”; G$
INPUT”ENTER SALARY”; S
WRITE #1, N$, A$, A, G$, S
INPUT “DO YOU WANT TO
CONTINUE”; CH$
LOOP WHILE UCASE$(CH$) = “Y”
CLOSE #1
END
Supplementary Examination 2067
Jaya Ganeshya
Group A
Computer Fundamental (22 marks)
Group A
Computer Fundamental (22 marks)
1. Answer
the following questions:
a) Define
LAN topology. Draw the Bus topology.
Ans: LAN topology
is the arrangement or
connection pattern of computers or nodes and other devices of the network Diagram
of Bus topology:
b) What is
multimedia? Name any two fields where multimedia is used.
Ans: The
integration of several forms of media such as text, audio, video, animation,
etc. to present the information in more attractive and understandable way is
known as multimedia.
Any two
fields where multimedia is used are as follows:
i. Multimedia technology in advertisement
ii.Multimedia technology to learn foreign language
c) Give two
advantages of e-mail over traditional mail.
Ans: The
advantages of e-mail over traditional mail are as follows:
i. It is faster and cheaper.
ii.It allows us to send and receive messages, documents, sounds, etc. across
the world.
d) Write any
two ways of protecting computer software.
Ans: Any two ways
of protecting computer softwares are:
i. Defragmentation
ii.Scan disk
e) What is
antivirus? Name any two antivirus software.
Ans: The software designed to detect and remove virus from the computer to ensure a virus free environment is known as anti-virus software.
Ans: The software designed to detect and remove virus from the computer to ensure a virus free environment is known as anti-virus software.
Any two
anti-virus software are as follows:
i. Norton Antivirus
ii.McAfee
3. Match the following:
Group
A Group
B
a) Pictures in motions i) Guided media
b) TCP/IP ii) animation
c) UTP iii) Random Access Memory
d) Volatile memory iv) CD-ROM
v) Protocol used in Internet
a) Pictures in motions i) Guided media
b) TCP/IP ii) animation
c) UTP iii) Random Access Memory
d) Volatile memory iv) CD-ROM
v) Protocol used in Internet
Ans:
Group A Group
B
a) Pictures in motions - Animation
b) TCP/IP - Protocol used in Internet
c) UTP - Guided media
d) Volatile memory - Random Access Memory
4. Choose the best answer:
a) Pictures in motions - Animation
b) TCP/IP - Protocol used in Internet
c) UTP - Guided media
d) Volatile memory - Random Access Memory
4. Choose the best answer:
a) E-commerce is ………….
i) a type of business ii) a type of virus
iii) both (i) &(ii) iv) None of the above
i) a type of business ii) a type of virus
iii) both (i) &(ii) iv) None of the above
Ans: a
type of business
b) E-mail is a/an ……………
i) organization which controls internet ii) protocol to access internet
iii) service of Internet iv) none of the above
i) organization which controls internet ii) protocol to access internet
iii) service of Internet iv) none of the above
Ans:
service of internet
c) Which one is not a type of virus?
i) message carrying virus ii) boot sector virus
iii) system infector iv) special purpose application infector
i) message carrying virus ii) boot sector virus
iii) system infector iv) special purpose application infector
Ans:
special purpose application infector
d) Which one is an example of bounded media?
i) Fiber optics ii) Microwave transmission
iii)Laser transmission iv) infrared transmission
Ans:Fiber optics
i) Fiber optics ii) Microwave transmission
iii)Laser transmission iv) infrared transmission
Ans:Fiber optics
5. Give an appropriate technical terms of the
following:
a) Network of networks
a) Network of networks
Ans:
Internet
b) A device which can convert analog signal to digital
codes and vice versa.
Ans:
MODEM
c) A company that provides the internet facility.
Ans: ISP
(Internet Service Provide)
d) An electronic device that supply electronic current when electricity is cut off.
d) An electronic device that supply electronic current when electricity is cut off.
Ans: UPS
(Uninterruptible Power Supply)
6. Write the full forms of:
a) NIC- Network Interface Card
6. Write the full forms of:
a) NIC- Network Interface Card
b) WAN- Wide Area
Network
c) WWW- World Wide Web
d) FTP-File Transfer Protocol
Group B
Database (10 marks)
Database (10 marks)
7. Answer the following questions:
a) What is database? Name any two database software.
Ans: Database is a collection of related and organized
information that is used to store, organize and extract data.
Any two database software are as follows:
i. Telephone
directory
ii.Dictionary
b) Name any four data types that can be define in
MS-Access.
Ans: Any four data types that can be defined in MS-Access
are as follows:
i. Number
ii.Text
iii. Auto
number
iv. Memo
c) What is a report? Give its importance.
Ans: Report is an object of MS-Access that is used to
present data in a printed format using a specific layout.
The importance of report are as follows:
i. It
presents data and information from table or query in a flexible layout.
ii.It helps to present
data in printed format.
8. Match the following:
Group
A Group B
a) MS-Access i) Data entry and editing interface
b) Query ii) Electronic Spreadsheet software
a) MS-Access i) Data entry and editing interface
b) Query ii) Electronic Spreadsheet software
c)
Record iii) Tool to
retrieve data from one or more than one tables
d)Form iv) Data base management software
v) Collection of related fields
d)Form iv) Data base management software
v) Collection of related fields
Ans:
Group
A Group
B
a) MS-Access - Database
management software
b) Query - Tool to retrieve data from one or more than one tables
c) Record - collection of related fields
d)Form - Data entry and editing interface
b) Query - Tool to retrieve data from one or more than one tables
c) Record - collection of related fields
d)Form - Data entry and editing interface
9. State whether the following statements are true or false:
a) A query
is used to select fields and records from many tables.True
b) MS-Access is not spread sheet software.True
c) Index increases the speed of the query and sort operations.True
d) The primary key field can also be left empty.False
b) MS-Access is not spread sheet software.True
c) Index increases the speed of the query and sort operations.True
d) The primary key field can also be left empty.False
Group C
Programming (18 marks)
Programming (18 marks)
10. a) What is a
loop?
Ans:The process
of repeating a statement or block of statement for a number of times is known
as loop.
b) Name any two
data types used in C language.
Ans: Any two data
types used in C language are:
· int
· char
c) Give the
functions of NAME and CLOSE statements.
Ans: The
functions of:
i. NAME: It renames a file on a diskette.
ii. CLOSE: It closes one
or all open files.
11. Rewrite
the following program after correcting the bugs:
DECLARE SUB Series()
CLS
EXECUTE Series
END
SUB Series()
REM program to generate 1 1 2 3 5…. Up to 20th terms
DECLARE SUB Series()
CLS
EXECUTE Series
END
SUB Series()
REM program to generate 1 1 2 3 5…. Up to 20th terms
A=1
B=1
FOR
ctr= 10 TO 1
DISPLAY
A;B;
A=A+B
B=A+B
EXT
ctr
END Series()
Ans:
DECLARE SUB
Series ( )
CLS
CALL Series
END
SUB Series()
A=1
CLS
CALL Series
END
SUB Series()
A=1
B=1
FOR
ctr= 1 TO 10
PRINT A;B;
A=A+B
B=A+B
NEXT ctr
END Series( )
12. Write
the output of the following program:
DECLARE
FUNCTION AREA(L,B)
CLS
LET L =100
LET B = 20
LET
ans=AREA(L,B)
PRINT “The
area=”,ans
END
FUNCTION
AREA(L,B)
ar=L*B
AREA=ar
END FUNCTION
13. Analyse
the program given below and answer the questions.
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.
Ans: The
numerical variables used in the program are: A, B, P.
b) List all the local variables used
in the program.
Ans: The local
variables used in the program is P.
14.a) Write a program using FUNCTION….END FUNCTION to
get a word from the user and then print the word in reverse order
Ans:
DECLARE
FUNCTION REV$(S$)
CLS
INPUT “Enter
any word”; S$
PRINT “The
reverse word 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
b) Write a program using SUB….END SUB to get radius of
circle and then print its circumference.
Ans:
DECLARE SUB CIRC(R)
CLS
CONST PI=3.1416
INPUT ”Enter radius”; R
CALL CIRC(R)
END
SUB CIRC(R)
C=2*PI*R
PRINT “The circumference of circle=”;C
END SUB
c) A sequential data file called ‘MARKS.DAT’ contains ROLL
NO, NAME, English, Nepali and Maths fields. Write a program to display all the
contents of the data file.
Ans:
OPEN
“MARKS.DAT” FOR INPUT AS #1
CLS
WHILE NOT
EOF(1)
INPUT #1,
RN, N$, E, N, M
PRINT RN,
N$, E, N, M
WEND
CLOSE #1
END
SLC Examination-2067(2011)
Jaya Ganeshya
Computer Fundamental (22 marks)
1. Answer
the following questions:
a. Write any two examples of data communication.
a. Write any two examples of data communication.
Ans: Any two
examples of data communication are
1. E-mail
2. Telephone
b. What do
you mean by web browser?
Ans: Web
browser is a computer program that access web pages and displays them on the
user computer.
c. Write any
four advantages of multimedia.
Ans: Any
four advantages of multimedia are:
i) It makes teaching / learning easier in classroom.
ii) It makes easy to share views, ideas and thoughts among various people.
iii) It can store data and information for longer period.
iv) It makes presentation of related subject matter attractive.
i) It makes teaching / learning easier in classroom.
ii) It makes easy to share views, ideas and thoughts among various people.
iii) It can store data and information for longer period.
iv) It makes presentation of related subject matter attractive.
d. Mention
any four symptoms of computer virus.
Ans: Any
four symptoms of computer virus are:
i) Program takes long time to load.
ii) The floppy disk or hard disk is suddenly accessed without a logical reason.
iii) Increased use of disk space and growth in file size.
iv) Corrupting the system data.
i) Program takes long time to load.
ii) The floppy disk or hard disk is suddenly accessed without a logical reason.
iii) Increased use of disk space and growth in file size.
iv) Corrupting the system data.
e. What is
computer security?
Ans: 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.
3.Match the
following:
Group A Group
B
a) Satellite a) Multimedia
b) HTTP b) Protocol
c) Online business c) Unguided media
d) Fiber optics d) E-commerce
Answers
a) Satellite a) Multimedia
b) HTTP b) Protocol
c) Online business c) Unguided media
d) Fiber optics d) E-commerce
Answers
Group
A Group
B
a) Satellite Unguided media
b) HTTP Protocol
c) Online business E-commerce
d) Fiber optics Guided media
a) Satellite Unguided media
b) HTTP Protocol
c) Online business E-commerce
d) Fiber optics Guided media
4. Choose
the correct answer:
a) Which is not a communication media?
i) Wire ii) Microwave
iii) Satellite iv) NIC
NIC
a) Which is not a communication media?
i) Wire ii) Microwave
iii) Satellite iv) NIC
NIC
b) Which is web browser software?
i) Window 2007 ii) Internet Explorer
iii) Windows NT iv) All of the above
Internet Explorer
c)In which
topology network devices are connected through hub?
i) Ring topology ii) Bus topology
iii) Star topology iv) None of the above
Star topology
i) Ring topology ii) Bus topology
iii) Star topology iv) None of the above
Star topology
d) Which is
not related to Internet?
i) ISP ii) TCP/IP
iii) WWW iv) UPS
UPS
i) ISP ii) TCP/IP
iii) WWW iv) UPS
UPS
5. Give
appropriate technical terms of the following:
a) An internet tool that helps to upload/download the file.
FTP (File Transfer Protocol)
b) Making duplicate copy of file for security purpose.
Backup
a) An internet tool that helps to upload/download the file.
FTP (File Transfer Protocol)
b) Making duplicate copy of file for security purpose.
Backup
c) A set of rules that governs how computer exchange information over computer network.
Protocol
d) An integrations of audio, video, graphics and text.
Multimedia
6. Write the full forms:
a)
URL = Uniform
Resource Locator
b)ISP = Internet
Service Provide
c)ASCII =American
Standard Code for Information Interchange
d)Bps = Bits
per second
Group B-Database
7. Answer
the following questions:
a) Define
DBMS with examples.
Ans: DBMS is
a software which is used to manage data, manipulate them and provide the
information. Examples of DBMS are MS-Access and Oracle.
b) What is
primary key?
Ans: Primary
key is a field that uniquely identifies the record. It is needed because it
neither accepts duplicate values now null values.
c) Why is
reporter created?
Ans: Report
is created to print documents according to user’s specifications of the
summarized information through query or table.
8. Choose the best answer:
a) Which is not a type of query?
i) Search ii) Select
iii) Update iv)All of the above
Search
8. Choose the best answer:
a) Which is not a type of query?
i) Search ii) Select
iii) Update iv)All of the above
Search
b) The storage size of data and time is :
i) 4 bytes ii)6 bytes
iii)8 bytes iv)10 byte
8 bytes
c) Collecting multiple related fields is called:
i)Records ii)Table
iii) Forms iv)Query
Records
d) The data type appropriate to store salary is:
i)Memo ii)Currency
iii)Text iv) Auto number
Currency
9. Match the following:
a)OLE a)Report
b) Data entry b) Picture
c)Indexing c) Table
d)Formatted printout d)Fast searching
e)Form
9. Match the following:
a)OLE a)Report
b) Data entry b) Picture
c)Indexing c) Table
d)Formatted printout d)Fast searching
e)Form
Answers
a)OLE Picture
b) Data entry Form
c)Indexing Fast searching
d)Formatted printout Report
b) Data entry Form
c)Indexing Fast searching
d)Formatted printout Report
Group C-Programming
10. i) What
is procedure?
Ans:
Procedure is a block of statement that solves a particular problem.
ii) Write any two characteristics of C language.
ii) Write any two characteristics of C language.
Ans: Any two
characteristics are :
i) It is a high level language with some features of low level language.
ii) It is mostly used to prepare system software.
iii) Write the function of:
-INPUT
i) It is a high level language with some features of low level language.
ii) It is mostly used to prepare system software.
iii) Write the function of:
-INPUT
Ans: It
reads data from the sequential data file.
-MKDIR
Ans: It
creates a subdirectory which is used to manage files.
11. Write
the output of the following program.
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
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
12. Rewrite
the given program after correcting the bugs.
REM to display all the records from sequential Rem 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
REM to display all the records from sequential Rem 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
Debugged
Program
REM to
display all the records from sequential Rem data file ABC.DAT
OPEN “ABC.DAT” FOR INPUT AS # 1
OPEN “ABC.DAT” FOR INPUT AS # 1
DO WHILE NOT
EOF (1)
INPUT # 1,N$,A
PRINT N$,A
LOOP
INPUT # 1,N$,A
PRINT N$,A
LOOP
CLOSE #1
END
END
13. Read the
program given below and answer the following questions.
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
i) In which condition the statements within the WHILE….WEND looping statement will not be executed?
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
i) In which condition the statements within the WHILE….WEND looping statement will not be executed?
Ans: When
the value of N becomes 0 or when the condition becomes false the statements
within the WHILE….WEND looping statement will not be executed
ii) Will the output be the same if we place “/” instead of”\” in the above program.
ii) Will the output be the same if we place “/” instead of”\” in the above program.
Ans: No, the
output will not be same if we place “/” instead of”\” in the above program.
14. i) Using FUNCTION…END FUNTION, write a program to calculate the average of three numbers.
14. i) 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
AV = AVERAGE(A, B, C)
PRINT “AVERAGE OF THREE NUMBERS”; AV
END
FUNCTION AVERAGE (A, B, C)
AVGR = (A + B + C) / 3
AVERAGE = AVGR
END FUNCTION
ii) 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 N; IS DIVISIBLE BY 13”
ELSE
PRINT N; IS NOT DIVISIBLE BY 13”
END IF
END SUB
iii) 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
PRINT
“NAME”, “POST”, “SALARY”, “TAX”
WHILE
NOT EOF(1)
INPUT
#1, N$, P$, S
T
= 15 / 100 * S
PRINT
N$, P$, S, T
WEND
CLOSE
#1
END
SLC Examination-2068(2012)
Jaya Ganeshya
Computer Fundamental (22 marks)
a) Define Computer network.
Ans: A
computer network means two or more than two computers connected to each other
to share data, hardware, software and other resources.
b) What is E-mail? Give an
example of valid E-mail I.D.
Ans: E-mail is
one of the most popular service provided by the internet which is used to send
and receive mail through the internet.
An example of valid E-mail
I.D. is khattrialisha@gmail.com
c) Write any two advantages
of multimedia in educational field.
Ans: Any two
advantages of multimedia in educational field are:
It
helps to present the information in more interactive and understandable way.
It
makes studying much more interesting.
d) What is a computer
hardware security?
Ans: The
security given to various hardware tools and equipment from being lost or
damaged due to accidental or intentional harm is known as computer hardware
security. For e.g.: fire detector, protection from theft, etc.
e) What is a computer virus?
Ans: A type of
computer program which is written by the programmer with the intent of damaging
or destroying the data and programs residing in the computer system is known as
computer virus.
3. Match the following:
Group
A Group B
a) LAN i) Within a city
b) MAN ii) Internet protocol
c) UPS iii) Within a city
d) IPX/SPX iv) Power supply device
v) Between countries
a) LAN i) Within a city
b) MAN ii) Internet protocol
c) UPS iii) Within a city
d) IPX/SPX iv) Power supply device
v) Between countries
Ans:
Group
A Group
B
a) LAN - Within a building
b) MAN - Within a city
c) UPS - Power supply device
d) IPX/SPX - Internet protocol
4. Select the best answer:
a) LAN - Within a building
b) MAN - Within a city
c) UPS - Power supply device
d) IPX/SPX - Internet protocol
4. Select the best answer:
a) Which of the following is
not a guided data communication media?
i) Coaxial cable ii)
Fiber
optic
iii) twisted pair iv) Satellite
iii) twisted pair iv) Satellite
Ans: Satellite
b) Process of arranging the
scattered parts of file into a contiguous manner.
i) Backup ii) Defragmentation
iii) Debugging iv) All of the above
i) Backup ii) Defragmentation
iii) Debugging iv) All of the above
Ans: Defragmentation
c) Which of the following is
remote login service?
i) Video conferencing ii) Telnet
iii) FTP iv) TCP/IP
i) Video conferencing ii) Telnet
iii) FTP iv) TCP/IP
Ans: Telnet
d) Which of the following is
an anti-virus program?
i) NAV ii) Windows
iii) Photoshop iv) All of the above
i) NAV ii) Windows
iii) Photoshop iv) All of the above
Ans: NAV
5. Write the appropriate technical term:
5. Write the appropriate technical term:
a) The data carrying
capacity of communication channel.
Ans: Bandwidth
b) Hub or switch based network
topology.
Ans: Star Topolgy
c) A computer virus that
damages the documents created in MS-Word & MS-Excel.
Ans: Macro virus
d) The moral principles that
control cyber-crime.
Ans: Cyber law
6. Write the full forms of:
6. Write the full forms of:
a)
bps -
bits per second
ii)
MAN -
Metropolitan Area Network
iii)
FTP -File
Transfer Protocol
iv)
URL -Uniform
Resource Locator
Group B
Database (10 marks)
Database (10 marks)
7. Answer the following
questions:
a) What is database?
a) What is database?
Ans: Database
is a collection of related and organized information that is used to store,
organize and extract data.
b) What data types are used
to store salary and date of the birth?
Ans: The data
types that are used for:
Salary
– Currency
Date
of birth – Date/Time
c) What is query?
Ans: Query is
an object of MS-Access which allows selecting specific data from one or more
tables.
8. Select the best answer:
8. Select the best answer:
a) The maximum size of text
field in MS-Access is …………
i) 50 ii) 10
iii) 6400 iv) 255
i) 50 ii) 10
iii) 6400 iv) 255
Ans: 255
b) The default data type in
MS-Access is ……..
i) Number ii) Date/Time
iii) Memo iv) Text
i) Number ii) Date/Time
iii) Memo iv) Text
Ans: Text
c) Report can be generated
by using data from …………
i) Table ii) Query
iii) Forms iv) Both (i) &(ii)
i) Table ii) Query
iii) Forms iv) Both (i) &(ii)
Ans: Both (i) & (ii)
d) …………….. query changes
value in main table.
i) Select ii) Update
iii) Both (i) &(ii) iv) None of the above
i) Select ii) Update
iii) Both (i) &(ii) iv) None of the above
Ans: Update
9. Match the following:
Group A Group
B
a) Indexing data i) Retrieves data conditionally
b) Long Text ii) DBMS
c) Fox Pro iii) Memo field
d) Query iv) Searching fast
v)Report
a) Indexing data i) Retrieves data conditionally
b) Long Text ii) DBMS
c) Fox Pro iii) Memo field
d) Query iv) Searching fast
v)Report
Ans:
Group
A Group
B
a) Indexing
data - Searching
fast
b) Long Text - Memo field
c) Fox Pro - DBMS
d) Query - Retrieves data conditionally
b) Long Text - Memo field
c) Fox Pro - DBMS
d) Query - Retrieves data conditionally
Group C
Programming (18 marks)
Programming (18 marks)
10. a) Mention the types of procedure.
Ans: The types
of procedures are:
i. Function
Procedure
ii. Sub
Procedure
b) Write any one difference between Q-Basic and C
language.
Ans: The
difference between Q-Basic and C language are as follows:
Q-Basic
|
C language
|
It is mostly used to
design application software.
|
It is mostly used to
prepare system software.
|
c) Write the functions of the following:
i) KILL ii) RMDIR
Ans: The function of:
i. KILL:
It deletes the file or files from the specified drive or directory.
ii. RMDIR:
It removes or deletes only sub directory from a disk
11. Rewrite the following
program after correcting the bugs.
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
OPEN “Marks.dat” FOR OUTPUT AS #1
CLS
WHILE EOF(1)
INPUT #1, Name$, Age, Add$
DISPLAY Name$, Age, Add$
WEND
CLOSE 1
END
Ans:
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
12. Write down the output of the following program:
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
12. Write down the output of the following program:
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
LET L=10
LET B=5
PRINT “The area=”; area(L,B)
END
FUNCTION area(L,B)
A=L*B
area=A
END FUNCTION
13. Analyse the program and
answer the following question:
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
a) List
any two variables used in the above program.
Ans: Any two
variables used in the above program are: A and B
b) How
many times SUB-procedure will be called when program is executed?
Ans: SUB-procedure
will be called 3 times when the program is executed.
14.a) Write a program in QBASIC to find the
total surface area of a box using FUNCTION….END FUNCTION.
Ans:
DECLARE FUNCTION TSA(L,B,H)
CLS
INPUT “Enter length, breadth
and height”; L,B,H
PRINT “The total surface
area of box=”; TSA(L,B,H)
END
FUNCTION TSA(L,B,H)
T=2*(L*B+B*H+L*H)
TSA=T
END FUNCTION
b) Write a program to input
three different numbers in the main module then find the greatest number using
SUB….END SUB.
Ans:
DECLARE SUB GREAT(A,B,C)
CLS
INPUT “Enter any three
numbers”; A,B,C
CALL GREAT(A,B,C)
END
SUB GREAT(A,B,C)
IF A>B AND A>C THEN
PRINT A;”is greatest number”
ELSEIF B>A AND B>C
THEN
PRINT B;”is greatest number”
ELSE
PRINT C;”is greatest number”
END IF
END SUB
c) Write a program to view
those records from “Employee.dat” sequential data file having employee’s name,
department, appointment data and salary whose salary is more than Rs.5000.
Ans:
OPEN “EMPLOYEE.DAT” FOR
INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, N$, D$, AD$, S
IF S > 5000 THEN PRINT
N$, D$, AD$, S
WEND
CLOSE #1
END
SLC Examination 2068 (2012)
Jaya Ganeshya
Computer fundamental (22 marks)
1. Answer the following
questions:
a) Define LAN topology and write any two types of LAN topology.
a) Define LAN topology and write any two types of LAN topology.
Ans: The arrangement or
connection pattern of computers or nodes and other devices of the network is
known as LAN topology.
Any two types of LAN
topology are
i) Bus topology
ii) Star topology
b) Write any four services of Internet.
Ans: Any four services of
internet are
i) E-mail
(Electronic mail)
ii) FTP (File Transfer Protocol)
iii) IRC (internet Relay Chat)
iv) E-commerce
ii) FTP (File Transfer Protocol)
iii) IRC (internet Relay Chat)
iv) E-commerce
c) Write
any two advantages of multimedia in education field.
Ans: Any two ad advantages
of multimedia in education field are
i) It makes
teaching/learning easier in classroom.
iv) It makes presentation of
related subject matter attractive.
d) Write any two software security measures.
Ans: Any two software
security measures are:
i) Backup
ii) Password
e) Write any four symptoms that show, computer is infected by computer virus.
Ans: Any four symptoms that
show, computer is infected by computer virus are :
i) Program takes long time
to load.
ii) The floppy disk or hard disk is suddenly accessed without a logical reason.
iii) Increased use of disk space and growth in file size.
iv) Corrupting the system data.
ii) The floppy disk or hard disk is suddenly accessed without a logical reason.
iii) Increased use of disk space and growth in file size.
iv) Corrupting the system data.
3. Match the following:
Group A Group B
a) Microwave a) Multimedia
b) Volt guard b) Protocol
c) Sound card c) Unguided media
d) TCP/IP d) Power protection devices
e) Guided media
Group A Group B
a) Microwave a) Multimedia
b) Volt guard b) Protocol
c) Sound card c) Unguided media
d) TCP/IP d) Power protection devices
e) Guided media
Answers
Group
A Group
B
a) Microwave Unguided media
b) Volt guard Power protection devices
c) Sound card Multimedia
d) TCP/IP Protocol
a) Microwave Unguided media
b) Volt guard Power protection devices
c) Sound card Multimedia
d) TCP/IP Protocol
4. Select the best answers:
a) Which of the following is not a protocol?
i) POP ii) TCP/IP
iii) NOS iv) FTP
NOS
b) Which device protects hardware?
i) UPS ii) MODEM
iii)
Gateway iv) All of the above
UPS
c) In which communication media data transfer high?
i) Twisted pair ii) Co-axial cable
iii) Fiber optic iv) Microwave
Fiber optics
d) Which computer virus damages the master boot record?
i) Macro virus ii) File virus
iii) New folder virus iv) Boot sector virus
Boot sector virus
5. Write the appropriate
technical terms:
a) The device used to connect PC with telephone line.
a) The device used to connect PC with telephone line.
MODEM
b) The rules that make the network communication possible.
Protocol
c) A program that effect the normal functioning of computer.
Computer Virus
d) A main computer in the computer network.
Server
6. Write down the full forms:
a) bps= bits per second
6. Write down the full forms:
a) bps= bits per second
b)
MAN = Metropolitan
Area Network
c)
FTP = File
Transfer Protocol
iv)URL = Uniform
Resource Locator
Group B-Database Management(10 marks)
7. Answer the following questions:
a) What is database?
Group B-Database Management(10 marks)
7. Answer the following questions:
a) What is database?
Ans: Database is a
collection of related and organized information that can be used for different
purpose.
b) What is data
sorting?
Ans: Data sorting means
grouping all the records in a table either in ascending or descending order
based on a key field of the record.
c) What is a form?
Ans: Form is an object of
MS-Access which provides a user friendly interface to enter data in a table or
multiple linked tables.
8. Select the best answers:
a) ………………. Is not a data type of MS-Access.
i) Number ii) Text
iii) Memo iv) Form
a) ………………. Is not a data type of MS-Access.
i) Number ii) Text
iii) Memo iv) Form
Form
b) Primary key does not accept ……….
i) Text ii) Number
iii) Null value iv) None of the above
Null value
c) ……………….. object of access
is used to print formatted data.
i) Query ii) Form
iii) Report iv) Table
i) Query ii) Form
iii) Report iv) Table
Report
d) In MS-Access data are stored in ………………
i) Form ii) Query
iii) Table iv) All of the above
Table
9. Match the following:
Group A Group B
a) Indexing a) Limits the value
b) Report b) Data type
c) Validation Rule c) Error messages
d) Hyper link d) Final output
e) Search fast
9. Match the following:
Group A Group B
a) Indexing a) Limits the value
b) Report b) Data type
c) Validation Rule c) Error messages
d) Hyper link d) Final output
e) Search fast
Answers
Group
A Group
B
a) Indexing Search fast
a) Indexing Search fast
b) Report Final
output
c) Validation
Rule Limits
the value
d) Hyper link Data type
d) Hyper link Data type
Group C- Programming (18 marks)
10. a) What is
loop?
Ans: Loop means executing a
statement or group of statements a certain number of times depending upon the
condition.
b) List any two data types
supported by ‘C’ language.
Ans: Any two data types
supported by ‘C’ language are:
i) char
ii) int
c) State the function of the following statement:
i) EOF
Ans: It detects the
end of the file marker reading the data from an open sequential file.
ii)
MKDIR
Ans: It creates a subdirectory which is used to manage files.
11. Re-write the given
program after correcting the bugs:
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)
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)
Debugged Program
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 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
13. Analyze the program given below and answer the questions:
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.
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 used in the above program are
1) UCASE$(
)
2) 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’
inline 3 [i.e. C=Count(R$)] given in the above program is to call the function
and store the value returned by the function count.
14. a) Write a program to calculate the area of four walls using SUB…END SUB.
DECLARE
SUB AREA (L, B, H)
CLS
INPUT
“ENTER LENGTH”; L
INPUT
“ENTER BREADTH”; B
INPUT
“ENTER HEIGHT”; H
CALL
AREA (L, B, H)
END
SUB
AREA(L, B, H)
A
= 2 * H * (L + B)
PRINT
“AREA OF FOUR WALLS=”; A
END
SUB
b)
Write a program using FUNCTION…..END FUNCTION to get a word from the
user and print it in reverse order.
DECLARE FUNCTION REV$
(S$)
CLS
INPUT "ENTER ANY
WORD"; S$
PRINT "REVERSED WORD 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
c)
A sequential data file called “student.dat” contains some records under
the field’s name, English, Nepali and Computer. Write a program to add some
more records in the same sequential data file.
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
Supplementary Exam 2069
Jaya Ganeshya
Group A
Computer Fundamental (22 marks)
1. Answer
the following questions:
a.What is computer network?
Draw the diagram of BUS topology.
Ans: A computer network means two or more than
two computers connected to each other to share data, hardware, software and
other resources.
Diagram of
bus topology:
b. Define
Internet and E-mail.
Ans: Internet: A collection of millions
of computers of different types belonging to various networks all over the
world is known as internet.
E-mail: E-mail is
one of the most popular services provided by internet which allows sending and
receiving mail through the internet.
c.Write any four
advantages of using multimedia.
Ans: Any four advantages of using multimedia
are as follows:
i. It makes easy to share
views, ideas and thoughts among various people around the world.
ii. It can store data and information
for a long period.
iii. It makes the presentation of related subject
matter attractive.
iv. It makes teaching-learning easier in
classroom.
d. Write any four possible threats to computer
security.
Ans: Any four possible threats to computer
security are:
i.Extreme
temperature and dust
ii. Theft
of hardware components.
iii. Voltage
fluctuation
iv. Unauthorized
access of data and programs
e.What is anti-virus
program? Give any two examples.
Ans:The software which is designed to detect
and remove viruses from computer system to ensure a virus-free environment is
known as anti-virus software.
Any two
examples of anti-virus software are:
i. Norton Antivirus
ii. McAfee
4.Match the
following:
Group
A Group
B
a) Sound
card i)
WAN
b) Virus ii) Internet explorer
c) Web browser iii) Multimedia
d) Satellite link iv) damage or corrupt data
v) Bridge
b) Virus ii) Internet explorer
c) Web browser iii) Multimedia
d) Satellite link iv) damage or corrupt data
v) Bridge
è
Group
A Group
B
a) Sound card - Multimedia
b) Virus - damage
or corrupt data
c) Web
Browser - Internet
explorer
d) Satellite
link - WAN
5. Choose
the best answers:
a. Each computers on the
Internet has a unique numeric address called a/an …
i) Web
address ii) Domain
address
iii) Network binding iv) IP address
iii) Network binding iv) IP address
IP address
b.Which of the following is the component of multimedia?
i)
Network ii)
Microphone
iii) Power cable iv) Printer
iii) Power cable iv) Printer
Microphone
c.Which of the following network connects computer to the
Internet?
i) Intranet ii)
LAN
iii) WAN iv) MAN
iii) WAN iv) MAN
WAN
d.Computer virus is………
i) dust
particle ii) computer
programs
iii) useful program iv) none of the above
iii) useful program iv) none of the above
Computer program
6. Give appropriate technical terms.
a.The integration of text, graphics, audio and video.
Multimedia
b. A spare copy of important program or document.
Backup data
Backup data
c. Law that governs the legal issue related to Internet.
Cyber law
d.The method of consolidating fragmented files on the
computers.
Defragmentation
7.Give the full forms:
a. LAN: Local Area Network
b. NIC: Network Interface Card
c. NOS: Network Operating System
d. UPS: Uninterruptible Power Supply
Group B
Database (10 marks)
8. Answer the following questions:
a.What is data? Give any two examples of DBMS software.
Ans: Data can be numbers, letters or symbols representing
facts and figures, which may or may not give any sense.
Any two examples of DBMS software are:
i. MS-Access
ii. Oracle
b. Write any two things to be considered after assigning
primary key for a field.
Ans: Any two things to be considered after assigning
primary key for a field are as follows:
i. i. Reduce and
control duplication of record in a table
ii. ii. Set the
relationship between tables.
c.What is form?
Ans: Form is an object of MS-Access which provides a user
friendly interface to enter data in a table or multiple linked tables.
9. State whether the following statements are true or
false:
a. Default text field size is of 255 characters. False
b. A database can contain multiple tables. True
c. A row in a table is known as record. True
d. Data like sound and pictures are held by memo data
type. False
10. Match the following:
Group
A Group
B
a)
Report i)
Data type
b) Currency ii) Column
c) Long Text iii) Database object
d) Field iv) Record
b) Currency ii) Column
c) Long Text iii) Database object
d) Field iv) Record
v)
Memo
Group A Group B
Group A Group B
Report - Database
object
Currency - Data
type
Long
text - Memo
Field - Column
Group C
Programming (18 marks)
11. Answer the
following questions:
a. Write the difference
between SUB procedure and FUNCTION procedure.
Ans: The
difference between SUB procedure and FUNCTION procedure are as follows:
SUB Procedure
|
FUNCTION Procedure
|
i)
SUB-procedure does not return value.
|
i)
FUNCTION-procedure must return a value.
|
ii)
SUB-procedure is called by CALL statement.
|
ii)
FUNCTION-procedure is called by statement and expression method.
|
iii)
SUB-procedure’s name does not accept data type symbol because it does not
need to return a value.
|
iii)
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.
|
b. Write the two basic data types
used in “C” language.
Ans: The basic
data types used in C language are as follows:
· char
· int
c. Write the function of the
following statements:
i. NAME: The
function of NAME statement is to rename a file on a diskette.
ii. CLOSE: The function
of CLOSE statement is to close one or all open file.
12. Re-write the
given program correcting the bugs:
Rem program
to reverse the string or word
DECLARE SUB REV(W$)
CLS
INPUT “Enter
a wod”;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
Rem program to reverse the string or
word
DECLARE SUB REV(W$)
CLS
INPUT “Enter a wod”;W$
CALL REV(W$)
END
SUB REV(W$)
FOR I=LEN(W$) to 1 step -1
C$=MID$(W$,I,1)
D$=D$+C$
NEXT I
PRINT “Reverse string is:”;D$
END SUB
13. Write the output of the
following program.
DECLARE SUB
Series()
CLS
CALL Series
END
SUB Series
A=1
B=1
FOR I = 1 TO 2
PRINT A; B;
A=A+B
B=A+B
NEXT I
END SUB
CLS
CALL Series
END
SUB Series
A=1
B=1
FOR I = 1 TO 2
PRINT A; B;
A=A+B
B=A+B
NEXT I
END SUB
14. Analyse the program given
below and answer the questions:
DECLARE FUNCTION CHK$(N)
CLS
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
CLS
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
a) Will the above program execute if
“DECLSRE FUNCTION….” is deleted?
Ans: Yes, the above program will execute if
“DECLARE FUNCTION…..” is deleted.
b) Why $ sign is used in the
name of the above function.
Ans: The $ sign is used in the above program
because function returns string value.
14. a) Write
a program to calculate and print the simple interest using FUNCTION……END
FUNCTION.
è DECLARE FUNCTION INTEREST (P,T,R)
CLS
INPUT “Enter
principal, time and rate”; P,T,R
PRINT “The
simple interest is”; INTEREST(P,T,R)
END
FUNCTION
INTEREST(P,T,R)
I=(P*T*R)/100
INTEREST=I
END FUNCTION
b) Write
a program to print the natural numbers from 1 to 5 using SUB…END SUB.
è DECLARE SUB SERIES ( )
CLS
SUB SERIES
END
SUB SERIES
FOR I = 1 TO
5
PRINT I
NEXT I
END SUB
c) A
sequential data file “Staff.dat” contains the name, address, post and salary of
the employees. Write a program to read and display all the records stored in
the above data file.
è OPEN “STAFF.DAT” FOR INPUT AS #1
CLS
WHILE NOT
EOF(1)
INPUT #1,
N$, A$, P$, S
PRINT N$,
A$, P$, S
WEND
CLOSE #1
END
SLC Examination 2069 (2013)
Optional II [Computer Science]
Computer
Fundamental (22 marks)
1.
Answer the following questions:
a)
Write any four advantages of computer network.
Ans:
Any 4 advantages of computer network are as follows:
i) Computer in a network can access network connected hardware devices like printer, disk drives, etc.
ii) Information can be exchanged rapidly in computer network.
iii) Computers in a network environment can be updated from any computer.
iv) Software packages can be shared between network connected computers.
i) Computer in a network can access network connected hardware devices like printer, disk drives, etc.
ii) Information can be exchanged rapidly in computer network.
iii) Computers in a network environment can be updated from any computer.
iv) Software packages can be shared between network connected computers.
b)
What is internet? Write the name of any two E-commerce sites.
Ans:
Internet is an interconnection of several thousands of computers of different
types belonging to the various networks all over the world.
c)
What is computer ethic?
Ans:
Computer ethics is the set of moral principles or code of conducts that should
be followed by computer user.
d)
What is hardware security? Write any two software security measures.
Ans:
The security given to the various hardware tools or equipment from being lost
or damaged due to accidental or intentional harm is hardware security.
Any
two software security measures are:
i) Password
ii) Backup
e)
What is computer virus?
Ans:
Computer virus is a program written by the programmer with the intention of
destroying and damaging the data and programs residing in the computer system.
3.
Match the following:
Group
A Group
B
a) RJ-45 a) Multimedia
b) WAN b) Duplicate copy
c) Back up c) Fiber optic cable
d) microphone d) Twisted pair cable
e) Internet
a) RJ-45 a) Multimedia
b) WAN b) Duplicate copy
c) Back up c) Fiber optic cable
d) microphone d) Twisted pair cable
e) Internet
Answers
Group
A Group
B
a) RJ-45 a) Twisted pair cable
b) WAN b) Internet
c) Back up c) Duplicate copy
d) microphone d) Multimedia
a) RJ-45 a) Twisted pair cable
b) WAN b) Internet
c) Back up c) Duplicate copy
d) microphone d) Multimedia
4.
Select the best answer:
a)
Which is not unguided media?
i) Fiber optics ii) Microwave
iii) Infrared iv) Radio wave
i) Fiber optics ii) Microwave
iii) Infrared iv) Radio wave
Ans: Fiber
optics
b) Which is the internet service?
i) IRC ii) Telnet
iii) E-mail iv) All of the above
b) Which is the internet service?
i) IRC ii) Telnet
iii) E-mail iv) All of the above
Ans: All
of the above
c) Which is not related to multimedia?
i) Printer ii) Sound card
iii) Microphone iv) CD-ROM
c) Which is not related to multimedia?
i) Printer ii) Sound card
iii) Microphone iv) CD-ROM
Ans: Printer
d) Which virus infects boot sector files?
i) Macro virus ii) Multipartite virus
iii) Boot sector virus iv) Program virus
d) Which virus infects boot sector files?
i) Macro virus ii) Multipartite virus
iii) Boot sector virus iv) Program virus
Ans: Boot
sector virus
5. Give appropriate technical terms:
5. Give appropriate technical terms:
a)
Business through internet.
Ans: E-commerce
b) The software that protects computer virus.
b) The software that protects computer virus.
Ans: Antivirus
Software
c) Physical layout of LAN.
c) Physical layout of LAN.
Ans: Topology
d) A sector word that gives user access to a particular program or computer system.
d) A sector word that gives user access to a particular program or computer system.
Ans: Password
6. Write the full forms of:
6. Write the full forms of:
a)
VOIP = Voice
Over Internet
Protocol
b)
MAN = Metropolitan
Area Network
c)
UTP = Unshielded
Twisted Pair
d)
WWW = World
Wide Web
Group B Database(10 marks)
Group B Database(10 marks)
7.
Answer the following questions:
a) What is database? Give two examples.
a) What is database? Give two examples.
Ans:
Database is a collection of related and organized information that can be used
for different purpose.
Two examples of database are:
i) Dictionary
ii) Telephone Directory
Two examples of database are:
i) Dictionary
ii) Telephone Directory
b)
Write any two types of primary key.
Ans:
The uses of Primary key are:
i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.
i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.
c)
What is query?
Ans:
Query is an object of Ms-Access which extracts and arranges information
from a table.
8.
Choose the best answer:
a) Which of the following is not a database application?
i) Oracle ii) Foxpro
iii) MS-Access iv) MS-Excel
a) Which of the following is not a database application?
i) Oracle ii) Foxpro
iii) MS-Access iv) MS-Excel
Ans: MS-Excel
b) Memory space consumed by a currency data type maximally is …………
i) 2 bytes ii) 4 bytes
iii) 8 bytes iv) 1 GB
b) Memory space consumed by a currency data type maximally is …………
i) 2 bytes ii) 4 bytes
iii) 8 bytes iv) 1 GB
Ans: 8
bytes
c) The default data type of MS-Access is:
i) Number ii)Text
iii) Memo iv) Auto number
c) The default data type of MS-Access is:
i) Number ii)Text
iii) Memo iv) Auto number
Ans: Text
d) Row is also called …………
i) Record ii) Field
iii) Database iv) Table
d) Row is also called …………
i) Record ii) Field
iii) Database iv) Table
Ans: Record
9. Match the following:
Group
A Group
B
i) OLE a) Data Entry
ii) Hyperlink b) Formatted Hardcopy
iii) Report c) 1 GB
i) OLE a) Data Entry
ii) Hyperlink b) Formatted Hardcopy
iii) Report c) 1 GB
iv)
Form d)
Up to 255 characters
e)
Up to 2048 characters
Answers
Group
A Group
B
i) OLE 1 GB
i) OLE 1 GB
ii)
Hyperlink Up
to 2048 characters
iii) Report Formatted Hardcopy
iii) Report Formatted Hardcopy
iv)
Form Data
Entry
Group-C
Programming(18 marks)
10.a)
What is meant by mode of data file?
Ans:
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.
b)
Write any two characteristics of ‘C’ language.
Ans:
The characteristics are :
i) It is a high level language with some features of low level language.
ii) It is mostly used to prepare system software.
i) It is a high level language with some features of low level language.
ii) It is mostly used to prepare system software.
c)
Write the function of the following statements:
i) NAME
i) NAME
Ans:
The NAME statement renames a file on a disk.
ii)
KILL
Ans:
The KILL statement deletes the file or files from the specified drive and
directory.
11.
Write the output of the following program
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
12. Rewrite the given program after correcting the
bugs:
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
Debugged
Program
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
13.
Study the following program and answer the given questions:
DECLARE
SUB EXAM(N$)
CLS
INPUT
“Enter word”;WO$
CALL
EXAM(WO$)
END
SUB
EXAM (N$)
FOR
I = 1 TO LEN (N$)
PRINT
RIGHT$(N$,I)
NEXT
I
END
SUB
a)
Write the names of two built-in functions used in the above program.
Ans:
The names of two built-in functions used in above program are LEN( ) and
RIGHT$( ) .
b)
List the real parameter in the program.
Ans:
The real parameter used in the above program is WO$.
14. a) Write a program to find the numbers of vowels
in an input string using
‘FUNCTION…..END FUNCTION’.
DECLARE
FUNCTION COUNT (S$)
CLS
INPUT
"ENTER ANY STRING"; S$
PRINT
"TOTAL NO. OF VOWELS= "; COUNT(S$)
END
FUNCTION
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
END
IF
NEXT
I
COUNT
= VC
END
FUNCTION
b) Write a program using sub procedure module to print
the series 1,1,2,3,5,8.. up to ten terms.
DECLARE
SUB SERIES ( )
CLS
CALL
SERIES
END
SUB
SERIES ( )
A
= 1
B
= 1
FOR
I = 1 TO 10
PRINT
A;
C
= A + B
A
= B
B
= C
NEXT
I
END
SU
c) Write a program to create a data file ‘teldir.dat’
to store Name, Address and Telephone number of employees according to the need
of the user.
OPEN
“teldir.dat” FOR OUTPUT AS #1
DO
CLS
INPUT
“ENTER NAME”; N$
INPUT
“ENTER ADDRESS”; A$
INPUT
“ENTER TELEPHONE NUMBER”; T#
WRITE
#1, N$, A$, T#
INPUT
“DO YOU WANT TO CONTINUE(Y/N)”; CH$
LOOP
WHILE UCASE$(CH$) = ”Y”
CLOSE
#1
END
2070
Jaya Ganeshya
Computer Fundamental (22 marks)
1. Answer
the following questions: 2×5=10
a a) What is network topology? Write
any one advantage of star topology.
Ans:The arrangement or connection
pattern of computer or nodes and other devices of the network are known as
network topology.
Any one advantage of star topology
is:
i) Failure of single computer or cable doesn’t affect
the entire network.
b) Give any two advantages of E-mail over traditional
mail.
Ans: Any two advantages of E-mail over
traditional mail are
i) It allows sending and receiving
message across the world at very low cost.
ii) Emails are usually received
fairly quickly, most of the time a couple of seconds after they are sent.
c) List any two main aims of formulating cyber law in
Nepal.
Ans:The two main aims of formulating
cyber law in Nepal are:
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.
d) Give any two symptoms of virus attack.
Ans: The two symptoms of virus attacks
are:
i) Increased use of disk space and
growth in file size
ii) Program takes long time to load.
e) Give the importance of UPS to the computer system.
Ans: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.
Ans: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.
2. a) Convert as
instructed: 0.5×2=1
i) (BED)16 into
binary
Converting
Hexadecimal to Binary equivalent value
B
= 1011
E
= 1110
D
= 1101
=
(101111101101)2
ii) (1010111)2 into
octal
Converting
Binary to Octal equivalent value
001
= 1
010
= 2
111
= 7
=(127)8
b) Perform the binary
calculations 0.5×2=1
3. Match the
following 0.5×4=2
Group
A Group
B
i)
Combination of several
media a)
Guided Media
ii)
POP b)
Power Protection Device
iii)
UTP c)
Multimedia
iv)
UPS d)
Protocol used in e-mail
e)
CD-ROM
Answers
i)
Combination of several media a)
Multimedia
ii)
POP b)
Protocol used in e-mail
iii)
UTP c)
Guided Media
iv) UPS d)
Power Protection Device
4. Choose the correct
answer 0.5×4=2
a)
Which of the following is an audio output device?
i)
Microphone ii) Speaker
iii) Monitor iv) Printer
iii) Monitor iv) Printer
Speaker
b)
Which one is not a type of virus?
i) Message Carrying
virus ii) Boot sector
virus
iii)System
virus iv)Special
Purpose Application Infector
Special
Purpose Application Infector
c) Which one is bounded media?
i) Fibre
optics ii)
Microwave
iii)
Infrared iv)Laser
Fibre optics
d) Which one is an operating system
software?
i) MS-Word ii)
MS-Excel
iii) Firefox iv) MS-DOS
iii) Firefox iv) MS-DOS
MS-DOS
5. Give an appropriate technical term for the
following. 0.5×4=2
a) A program that can disinfect a
file from virus
Antivirus Software
b) A person who steals or destroys
other’s data, information and program
Hacker
c) A company that provides internet
service
ISP
(Internet Service Provider)
d d) A computer in a network which can
provide services to other computer
Server
6. Write the full forms
of: 0.5×4=2
a)
TCP/IP = Transmission Control Protocol /
Internet Protocol
b)
LAN = Local Area Network
c)
UPS = Uninterruptible
Power Supply
d)
FTP = File Transfer
Protocol
Group B
Database (10 marks)
7. Answer
the following:
2×3=6
a) Define data and information.
Data can be numbers, letters or symbols representing
facts and figures which may or may not give any sense.
Information is an organized collection of related data
which gives a complete sense.
b) What is report? Give its
importance.
Report is an object of database which displays the
output in an effective way to present the data in a printed format.
The
importance of report are:
i) It displays the information the way we want to view it.
iii) It presents the information in designed layouts by adding necessary titles, setting font colour or font size, etc.
i) It displays the information the way we want to view it.
iii) It presents the information in designed layouts by adding necessary titles, setting font colour or font size, etc.
c) Name any four data types that can
be defined in MS-Access.
Any four data types that can be
defined in MS-Access are:
i)
Text
ii) Memo
iii) Number
iv) Yes/No
8.Choosethebestanswer.
a) The columns in database tables
are called:
i)
Record ii)
Field
iii) Report iv) Memo
iii) Report iv) Memo
Field
b) Which is suitable data type to
store video?
i)
Text ii)
Number
iii) Hyperlink iv) OLE object
iii) Hyperlink iv) OLE object
OLE object
c) Text data type can store maximum
of ___characters
i)
250 ii)
350
iii) 255 iv) 355
iii) 255 iv) 355
255
d) Which of the following is
database application?
i) MS-Word ii)
MS-Access
iii) MS-Excel iv) QBASIC
iii) MS-Excel iv) QBASIC
MS-Access
9. Match the
following 0.5×4=2
Group
A Group
B
i) Indexing
Data a)
Size upto 1 GB
ii)
Form b)
Column of datasheet
iii)
Field c)
Row on a datasheet
iv) OLE
object d)
Searching Fast
e)
Graphical interface for data entry
Answers
Group
A Group
B
i) Indexing Data a)
Searching Fast
ii)
Form b)
Graphical interface for data entry
iii)
Field c)
Column of datasheet
iv) OLE
object d)
Size upto 1 GB
Group C
Programming (18 marks)
10. a) What is a
variable?
1
The data item whose value changes during the execution
of a program is called variable.
b) Name any
two data types used in C
language. 1
Any
two data types used in C language are:
i)
char
ii)
int
c) Give the
functions
of: 0.5×2=1
i) NAME AS
The NAME statement renames a file on a diskette. Only
file name changes, data and program
ii) CLOSE
It
closes one or all open files.
11. Rewrite the following program after correcting the
bugs: 2
DECLARE SUB Series(.)
DLC
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()
Debugged Program
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
13. Study the following program and answer the
questions: 1×2=2
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 A, B, S
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.
14. a) 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). 3
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
b) Write a program using Sub….End
Sub to get a word from the user and then print it in reverse
order.
3
DECLARE SUB REV (S$)
CLS
INPUT "ENTER ANY STRING"; S$
CALL REV(S$)
END
SUB REV (S$)
W$ = W$ + B$
NEXT I
PRINT "REVERSED STRING IS "; W$
END SUB
c) A sequential data file called
“Marks.dat” contains Name, English, Nepali, Maths and Science Fields. Write a
program to display all the contents of that data
file. 3
OPEN “Marks.dat” FOR INPUT AS #1
CLS
PRINT
“NAME”, “ENGLISH”, “NEPALI”, “MATHS”, SCIENCE”
WHILE NOT EOF(1)
INPUT #1, N$, E, N, M, S
PRINT N$, E, N, M, S
WEND
CLOSE #1
END
****Jaya Ganeshya******
Elisha KC
Elisha KC
Wow😮😮😮
ReplyDeleteVery help ful for solving 10 set (Computer)
thank u so much dear
Delete