SLC
Examination-2067(2011)
Computer Fundamental (22 marks)
1. Answer the
following questions:
a. Write any two
examples of data communication.
Ans: Any two examples of data
communication are
1. E-mail: It is
used to transfer data from one computer to another computer.
2. Telephone: It
is used to transfer voice message from one device to another.
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
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
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.
a) An internet tool that helps to upload/download the file.
FTP
(File Transfer Protocol)
b) Making duplicate copy of file for security purpose.
b) Making duplicate copy of file for security purpose.
Backup
c) A set of rules that governs how computer exchange information over computer network.
c) A set of rules that governs how computer exchange information over computer network.
Protocol
d) An integrations of audio, video, graphics and text.
d) An integrations of audio, video, graphics and text.
Multimedia
6. Write the full forms:
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
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 bytes
i) 4 bytes ii)6 bytes iii)8 bytes iv)10 bytes
8 bytes
c) Collecting multiple related
fields is called:
i)Records ii)Table iii) Forms iv)Query
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
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?
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:
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 3 or not.
DECLARE
SUB CHECK (N)
CLS
INPUT
“ENTER ANY NUMBER”; N
CALL
CHECK (N)
END
SUB
CHECK (N)
IF N
MOD 3 = 0 THEN
PRINT
N; IS DIVISIBLE BY 3”
ELSE
PRINT
N; IS NOT DIVISIBLE BY 3”
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)
Optional
II [Computer Science]
Attempt
all the questions.
Computer fundamental (22 marks)
1. Answer the following questions:
a) Define LAN topology and write any two types of LAN topology.
1. Answer the following questions:
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.
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.
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.
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
4. Select the best answers:
a) Which of the following is not a protocol?
i) POP ii) TCP/IP iii) NOS iv) FTP
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 optics
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 b) Report Final output c) Validation Rule Limits the value
d) Hyper link Data type
a) Indexing Search fast b) Report Final output c) Validation Rule Limits the value
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) MKDIRAns: 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 ProgramDECLARE 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
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$)
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
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
4. Select the best answer:a) Which is not unguided media?
i) Fiber optics ii) Microwave iii) Infrared iv) Radio wave
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
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
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: a) Business through internet.
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
d) A sector word that gives user access to a particular program or computer
system.
Ans: Password
6. Write the full forms of: a) VOIP = Voice Over Internet Protocol
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.
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 ii) Hyperlink Up to 2048 characters
iii) Report Formatted Hardcopy
i) OLE 1 GB ii) Hyperlink Up to 2048 characters
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 SUB
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
SLC EXAMINATION 2070
1.
Answer the following questions.
a) What is computer network? Write any two reasons for
computer network.
Ans: A
group of interconnected computers through transmission media in order to
communicate and share resources like hardware, data and software is called
computer network.
The reasons of keeping computers on the network are
a) To share hardware devices like printers, scanners, hard
disks etc.
To
share data, information and programs.
b) What is communication channel?
Ans: Communication channel is a pathway through which data are transmitted in a
network.
c) What is multimedia? Write any two areas where multimedia
is used.
Ans: Multimedia
is the integration of multiple forms of media, which presents information in
more interesting and understandable way.
Any two
application areas of multimedia technology are videogame and advertisement.
d) Write any four symptoms of computer virus.
Ans:
The 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? Write any two protective
measures of computer hardware.
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.
Any two protective measures of computer hardware are
a) Insurance
b) Power protection device
2. Converted as indicated:
a)
i. (209)10-(x)2
2 | 209 | Remainder
2 | 104 | 1
2 | 52 | 0
2 | 26 | 0
2 | 13 | 0
2 | 6 | 1
2 | 3 | 0
2 | 1 | 1
2 | 0 | 1
(209)10 = (11010001)2
ii. (537)8-(x)2
Soln:
Converting octal to binary,
5 = 101
3 = 011
7 = 111
(537)8-(101011111)2
b) Perform binary calculations:
i. 101 x 111
|
|
|
1
|
0
|
1
|
|
|
×
|
1
|
1
|
1
|
|
|
|
1
|
0
|
1
|
|
|
1
|
0
|
1
|
×
|
|
1
|
0
|
1
|
×
|
×
|
1
|
0
|
0
|
0
|
1
|
1
|
ii. 110111-1011
1
|
1
|
0
|
1
|
1
|
1
|
|
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
0
|
0
|
3. Match the following:
a) TCP/IP i.
Multimedia
b) Back
up ii.
Web address
c) Sound
card iii.
Software security
d) URL iv.
Protocol
v. RJ45
Answers
a) TCP/IP i.
Protocol
b) Back
up ii.
Software security
c) Sound
card iii.
Multimedia
d) URL iv.
Web address
4. Choose and copy the best answer:
1. Used to transfer file from one computer to another
computer in Internet.
i. FAQ ii. IRC iii. FTP iv. TPF
i. FAQ ii. IRC iii. FTP iv. TPF
Ans: FTP
2. Media used to transfer data in forms of light?
i. Microwave ii. Fiber optical iii. Radio wave iv. Satellite
i. Microwave ii. Fiber optical iii. Radio wave iv. Satellite
Ans:Fiber Optical
3. What is the route of virus transmission?
i. Monitor ii. Flash drive iii. Mouse iv. Cable
i. Monitor ii. Flash drive iii. Mouse iv. Cable
Ans: Flash drive
4. When was cyber law introduced in Nepal?
i. 2016 BS ii. 2061 BS iii. 2040 BS iv. 2015 BS
i. 2016 BS ii. 2061 BS iii. 2040 BS iv. 2015 BS
Ans: 2061 BS
5. Give appropriate technical terms for the following:
a. Network sharing and exchanging information between
different people. Computer network
b. Secret group of character which helps to protect file
from unauthorized person. Password
c. A set of rules and procedures that govern transmission of
messages. Protocol
d. Learning through electronic media. CAL
(Computer Aided Learning)
6. Write the full form of:
i. SMTP : Simple Mail Transfer Protocol
ii. IRC : Internet Relay
Chat
iii. UTP : Unshielded Twisted
Pair
iv. HTTP : Hyper Text Transfer Protocol
7. Write short answer of 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. List out any four data types used in MS-Access.
Ans:
Any four data types of MS-Access are:
i)Text
ii)Number
iii)Memo
iv)Currency
i)Text
ii)Number
iii)Memo
iv)Currency
c. Write any two advantages of Form.
Ans:
The advantages of form are:
It
provides an interactive platform for input of data into the database.
It helps to display data in more presentable form than a datasheet.
8. Write whether the following statements are true or
false:
a) Auto number data type is used to store data supplied by
us. False
b) Index makes sort process fast. True
c) Update Query does not change the data of table. False
d) Formatted document is also called report. True
9. Match the following:
a) dBASE i.
OLE
b) Primary
key ii.
Memo
c) Photo iii.
DBMS
d) Long text iv.
Uniquely defined
v. Hyper links
Answers:
a) dBASE i.
DBMS
b) Primary
key ii.
Uniquely defined
c) Photo iii.
OLE
d) Long
text iv.
Memo
GROUP C (Programming)
10.
a) What is looping?
Ans: The process of repeating a statement or statement
blocks for number of times is called looping.
b) Write any two data type used in C language.
The any two data type used in C language are
i) char
ii) int
c) Write the function of following statements or commands.
i. CLOSE : The CLOSE statement closes one or all open files.
i. CLOSE : The CLOSE statement closes one or all open files.
ii.
KILL : The KILL statement deletes the file or files from the
specified drive and directory.
11. Debug the given program:
a) OPEN "STUDENT.DAT" FOR APPEND AS 1#
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE$
WRITE #1, N$, ADD$, AGE
END# 1
STOP
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE$
WRITE #1, N$, ADD$, AGE
END# 1
STOP
Debugged Program
OPEN "STUDENT.DAT" FOR APPEND AS #1
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE
WRITE #1, N$, ADD$, AGE
CLOSE # 1
END
INPUT "NAME"; N$
INPUT "ADDRESS"; ADD$
INPUT "AGE"; AGE
WRITE #1, N$, ADD$, AGE
CLOSE # 1
END
12. Write the output of the following programs:
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
The
output of the program is
216
13. Study the following programs and answer the question:
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
a. List the library function used in the above program.
Ans: The library function used in the above program are
LEN and MID$
b. What will be the maximum value of X if the N$ is equal to
"Computer".
The value of X will be 8 if N$ is equal to
"Computer".
14.
a. WAP to calculate average of three numbers using
FUNCTION Procedure.
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
FUNCTION
AVERAGE (A, B, C)
AVGR =
(A + B + C) / 3
AVERAGE
= AVGR
END
FUNCTION
b. 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
c. A sequential data file "RECORD.DAT" has
records with field name, address, age and salary. WAP to display only those
records whose age is greater than 26.
OPEN “RECORD.DAT” FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT #1, N$, ADD$, A, S
IF A>26 THEN PRINT N$, ADD$, A, S
WEND
CLOSE #1
END
SLC 2071
1. Answer the
following questions:
a. Give two-two
difference between peer-to-peer and client/server network architecture.
Ans: The difference
between peer-to-peer and client/server network architecture are as follows:
Peer-to-peer
network
|
Client/server
network
|
· A group of
computers that acts both as client and server in order to share hardware,
software and other resources on the network is known as peer-to-peer network.
|
·The network
architecture which consist of at least one server and one or more client are
known as client/server network.
|
· Resource
sharing, processing and communication control are centralized upon the
server.
|
· Resource
sharing, processing and communication control are completely decentralized.
|
b. What is the
function of file transfer protocol (FTP)?
Ans: The functions of
FTP are:
· Enables to
transfer files between two or more than two computers.
· Makes
communication possible between computers on the internet.
c. What is
cybercrime? Give any two examples.
Ans: Cybercrime refers
to any illegal act involved in computer, computer system or over all computer
networks like internet.
Any two examples of cybercrime are:
· Cyber stalking
· Phishing
d. Write any four
preventive measures for computer hardware security.
Ans: Any four
preventive measures for computer hardware security are:
· Regular
maintenance
· Insurance policy
· Power protection
device
· Protection from
theft
e. Write any two
medium for transmission of computer virus.
Ans: Any two medium for
transmission of computer virus are:
· Sharing infected
internal portable disk like floppy disk, pen drive, CDs, etc.
· Exchanging data
and information over a network.
2. a. Convert as
indicated:
i. (108)10 into binary
Ans:
ii. (765)8 into decimal
Ans:
b. Perform the
following binary calculations:
i. 111*11
Ans:
ii. Divide 1101 by 11
Ans:
3. Match the
following:
a. E-commerce Power protection device
b. Volt
guard Online shopping
c. Satellite
link WAN
d. Sound
card Optical fiber
Multimedia
Ans:
a. E-commerce à Online shopping
b. Volt
guard à Power protection
device
c. Satellite
link à WAN
d. Sound
card à Multimedia
4. Choose the best
answer:
a. Which of the
following is remote login service?
i. Video
conferencing ii.
FTP iii.
Telnet iv. TCP/IP
Ans: Telnet
b. Process of
arranging the scattered parts of file into a contiguous manner is _______.
i.
debugging ii.
Backup iii.Defragmentation iv. Scandisk
Ans: Defragmentation
c. Which of the
following is an audio input device?
i. Printer ii. Microphone iii. Head
phone iv. Speaker
Ans: Microphone
d. Virus is a type of
___________.
i. System program ii.Package program iii.Destructive program iv. Web program
Ans: destructive program
5. Technical terms:
a. The data carrying
capacity of communication channel.
Ans: Bandwidth
b. The moral
principles that control cybercrime.
Ans: Computer ethics
c. Buying and selling
product and services online.
Ans: E-commerce
d. An integration of
text, audio, graphics and video.
Ans: Multimedia
6. Write down the
full forms:
a. LAN : Local Area Network
b. VOIP : Voice Over Internet Protocol
c. Gbps : Giga bits per second
d. DVD : Digital Versatile Disk
7. Answer the
following question:
a. Write any two
advantages of computerized database.
Ans: The two advantages
of computerized database are:
· It can store large
volume of data for longer period of time.
· Searching of data
is easier as it stores data in ascending or descending order.
b. Name any four
objects of MS-Access database.
Ans: The four object of
MS-Access are:
· Table
· Form
· Query
· Report
c. What is data
sorting?
Ans: Data sorting
refers to grouping all the records either in ascending or descending order
based on a key field of a record.
8. State whether the
following are true or false:
a. Graphics can also
be stored in MS-Access database. True
b. Maximum field size
of memo field is 256 characters. False
c. A form is an
object of MS-Access used for entering data. True
d. An action query
makes changes in a table. True
9. Match the
following:
a. Indexing
data Final output
b. Report View data
c. Yes/No Searching fast
d. Select
query Picture
Data type
Ans:
a. Indexing
data à Searching fast
b. Report à Final output
c. Yes/No à Data type
d. Select
query à View data
10. Answer the
following:
a. Mention the types
of procedures used in QBasic.
Ans: The types of
procedure used in QBasic are:
· Sub procedure
· Function procedure
b. Write two
characteristics of C language.
Ans: The two
characteristics of C language are:
· It has got rich
and powerful set of operators.
· It is used to
prepare system software.
c. Write down the
function of:
i. SHARED
Ans: The function of
SHARED is to declare a variable globally.
ii. CALL
Ans: The function of CALL
statement is to call sub procedure for performing specific task.
11. Re-write the
following correcting the bugs:
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
Ans:
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
12. Write down the
output:
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
Ans:
The output will
be:
Average of three numbers 10
13. Study the
following program and answer the following:
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
a. List the library
function used in the above program.
Ans: The library
function used in the above program is MID$.
b. List the
conditional statement used in the above program.
Ans: The conditional
statement used in the above program is:
IF C$=”P” THEN
14. a. Write a program
using FUNCTION….END FUNCTION to input a string and count the total number of
consonants.
Ans: DECLARE FUNCTION
COUNT(N$)
CLS
INPUT "Enter a string";
N$
PRINT "The total numebr of
consonant is"; COUNT(N$)
END
FUNCTION COUNT (N$)
C = 0
FOR I = 1 TO LEN(N$)
B$ = MID$(N$, I, 1)
C$ = UCASE$(B$)
IF C$ <> "A" AND C$
<> "E" AND C$ <> "I" AND C$ <>
"O" AND C$ <> "U" THEN C = C + 1
NEXT I
COUNT = C
END FUNCTION
b. Write a program using SUB……END
SUB to find the area of circle.
Ans: DECLARE SUB
AREA(R)
CLS
INPUT “Enter radius”; R
CONST PI=3.14
CALL AREA(R)
END
SUB AREA(A)
A=PI*R^2
PRINT “The area of circle=”; A
END SUB
c. 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.
Ans: OPEN “Salary.Dat”
FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, N$, P$, S
IF S>15000 AND S<40000 n="" p="" print="" s="" span="" then=""> 40000>
WEND
CLOSE #1
END
Solved
SLC Computer Science 2072
2072(2016)
(Computer fundamentals)
1. Answer
the following questions.
a) Define
LAN topology. Draw star topology.
Ans: The
arrangement or connection pattern of nodes or computers and other devices of
the network is called LAN topology.
Star Topology
b) Give
any two symptoms of virus attacks.
Ans: The
symptoms of virus attacks are:
i) Program
takes a long time to load.
ii) Corrupting the system’s data.
c) Write
one advantage and one disadvantage of multimedia.
Ans: The
advantage of multimedia is:
i) It
makes teaching learning easier in the classroom.
The
disadvantage of multimedia is:
i) Acquisition
or rental of equipments to produce multimedia can be costly.
d) Write
any two ways of protecting computer software.
Ans: The
two ways of protecting computer software are:
i)Password
ii)Backup
e) Write
any two services of internet.
Ans: The
two services of internet are:
i)E-mail
ii)IRC
2. a)Convert
as indicated:
i)(208)10 into Binary
Converting
decimal to binary,
2
|
208
|
|
2
|
104
|
0
|
2
|
52
|
0
|
2
|
26
|
0
|
2
|
13
|
0
|
2
|
6
|
1
|
2
|
3
|
0
|
|
1
|
1
|
(208)10=(11010000)2
ii)(104)8 into decimal
Converting
octal to decimal,
=1*82+0*81+4*80
=1*64+0*8+4*1
=64+0+4
=68
(104)8=(68)10
b)
Perform the binary calculations:
i)1011+1101
1011

11000
1011+1101=11000
ii)110*11
110

110
+ 110X
10010
110*11=10010
3. Match
the following:
Answers:
a) Microwave
: Unguided media
b) UTP
: Guided media
c) UPS
: Power protection
device
d) SMTP
: Protocol
4. State
whether the following statements are true or false:
a) Walky-talky
is an example of full duplex mode.
Ans:
False
b) Data
transfer rate is higher in optical fiber cable than in co-axial cable.
Ans: True
c) The
computer security refers to hardware security only.
Ans:
False
d) Sound
Card is one of the components of multimedia.
Ans:True
5. Write
the appropriate technical terms of the following:
a) A
program that can disinfect a file from virus.
Ans:
Antivirus software
b) A
person who steals or destroys other’s data, information, files and program.
Ans:
Hacker
c) A
company which provides the internet facilities.
Ans: ISP
d) A
computer which provides services to other computers in a network.
Ans:
Server
6. Write
the full forms of:
i)URL
:Uniform Resource Locator
ii)HTTP
:Hyper Text Transfer Protocol
iii)LAN
:Local Area Network
iv)MODEM
:Modulator-Demodulator
(Database)
7. Answer
the following questions:
a) Write
any four data types used in Ms-ACCESS.
Ans: Four
data types used in Ms-ACCESS are:
i) Text
ii) Memo
iii) Currency
iv) OLE
b) Define
database with example.
Ans: The
collection of organized and related information that can be used for different
purposes is called database. For example: dictionary and telephone directory.
c) What
is query?
Ans: The
object of MS-ACCESS that extracts and arranges information from a table is
called query.
8. State
whether the following statements are true or false:
a) A
query is used to select fields and records from only one table.
Ans:
False
b) MS-ACCESS
is DBMS software.
Ans: True
c) Index
decreases the speed of query and sort operations.
Ans:
False
d) Data
in primary key has to be unique and not null.
Ans: True
9. Match
the following:
a) OLE
: Data type
b) Validation
Rule
:
Limits the value
c) Form
: Data Entry
d) Indexing
: Easy to search
( Programming)
10. a)
What is procedure?
Ans: The
separate block of statements used by the module level code and called by any
number of times is called procedure.
b) Write
any two data types used in ‘c’ language.
Ans: The
two data types used in the ‘c” language are:
i) char
ii) int
c) Write
down the functions of the following statements:
i) OPEN:
It opens a sequential file for one of the three possible operations i.e.
reading, writing or appending.
ii)
MKDIR: It makes or creates a new directory on the specified disk.
11. Re-write
the following program after correcting the bugs:
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
Debugged
program:
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
12. Write
the output of the following program:
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)
Interest=(p*t*r)/100
End
FUNCTION
OUTPUT
The
simple interest=10
(Error
message will be displayed if the sub program is missing.)
13. Study
the following program and answer the following questions:
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
a) Write
the name of the user defined function used in the above program.
Ans: The
name of the user defined function used in the above program is
Prod.
b) Name
the loop in the above program.
Ans: The
loop in the program is FOR…NEXT.
14. a)
Write a program using SUB…..END SUB to display reverse of input-string.
DECLARE
SUB REV(A$)
CLS
INPUT
“ENTER ANY STRING”;A$
CALL
REV(A$)
END
SUB
REV(A$)
FOR I=
LEN(A$) TO 1 STEP -1
B$=MID$(A$,I,1)
W$=W$+B$
NEXT I
PRINT
“REVERSED STRING=”W$
END
SUB
b) Write
a program using FUNCTION…END FUNCTION to find area of the triangle.
DECLARE
FUNCTION AREA(B,H)
CLS
INPUT
“ENTER BASE”;B
INPUT
“ENTER HEIGHT”;H
PRINT
“AREA OF TRIANGLE”;AREA(B,H)
END
FUNCTION
AREA(B,H)
AREA=(1/2)*B*H
END
FUNCTION
c) A
sequential data file called “Marks.dat” contains NAME, AGE, CITY, and TELEPHONE
fields. Write a program to display all the contents of the data file.
OPEN
“Marks.dat” FOR INPUT AS #1
CLS
WHILE NOT
EOF(1)
INPUT #1,
N$, A, C$, T#
PRINT N$,
A, C$, T#
WEND
CLOSE #1
END
SEE 2073
Computer Science
1.
Answer the following questions.
a)
Write any two advantages of BUS topology.
Ans: The advantages
of bus topology are:
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.
b)
Define 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.
c)
Write any two preventive measures to protect computer system from computer
virus.
Ans:
Any two preventive measures are:
i) Do
not install pirated software, especially computer games
ii) Scan the mail or unknown files of internet before
opening in your computers.
d) What
is multimedia?
Ans:
Multimedia is the integration of multiple forms of media, which presents
information in more interesting and understandable way.
e)
Write the use/function of File Transfer Protocol.
Ans:
The use of File Transfer Protocol is to transfer the file from one computer to
another computer. It helps to upload and download the files.
2.
a) Perform the conversion as per the direction:
i)
(BAD)16 into binary
Soln:
Converting
Hexadecimal to Binary
B
= 1011
A
= 1010
D
= 1101
(BAD)16 =
(101110101101)2
ii) (1111001)2 into octal
Soln:
Converting Binary to octal
001 = 1
111 = 7
001 = 1
(1111001)2 = (171)8
b)
Perform the binary calculations:
i)
11 × 10 + 11
|
1
|
1
|
×
|
1
|
0
|
|
0
|
0
|
1
|
1
|
×
|
1
|
1
|
0
|
Now,
Adding with 11
|
|
1
|
0
|
|
+
|
1
|
1
|
1
|
0
|
0
|
1
|
11 × 10 + 11 = 1001
ii)
110 ¸ 10
10)
|
110 (
|
11
|
|
-10
|
|
|
10
|
|
|
10
|
|
|
00
|
|
Quotient
= 11
Remainder
= 00
3.
Match the following:
a)
Malicious
software i)
UPS
b)
Primary storage
device ii)
virus
c)
Power protection
Device iii)
copyright
d)
Intellectual property
law iv)
RAM
v)
CD-ROM
Answer
a)
Malicious
software virus
b)
Primary storage device RAM
c)
Power protection Device UPS
d)
Intellectual property law copyright
4.
State whether the following statements are true or false:
a)
Computer Network reduces the cost. True
b) WWW
is an organization which controls Internet. False
c)
Microwave transmission is an example of bound media. False
d) The
parts of the computer which can be seen and touched are called hardware. True
5.
Write the appropriate technical terms of the following:
a) A
type of network in which every computer works as both client and server.
Ans:
Peer-to-peer network
b)
Protocol used to receive email from the mail server.
Ans:
POP( post office protocol)
c) The
moving graphics images.
Ans:
Animation
d) The
law that controls cyber crimes.
Ans: Cyber Law
6.
Write the full forms:
a) LAN:
Local Area Network.
b)ROM:
Read Only Memory.
c)
SMTP: Simple Mail Transfer Protocol.
d)NOS:
Network Operating System.
7.
Answer the following questions.
a)
Define data and database.
Ans: Data can be numbers, letters or symbols representing
facts and figures which may or may not give any sense. Database is a collection
of related and organized information that can be used for different purpose.
b) What
is primary key? Write its importance.
Ans:
Primary key is a field that uniquely identifies the record. It is needed
because it neither accepts duplicate values nor permit null values.
The importance 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) Name any four data types used in MS-Access.
Ans: Any four data types of MS-Access are:
i) Text
ii) Number
iii) Memo
iv) Currency
i) Text
ii) Number
iii) Memo
iv) Currency
8.
Select the correct answer:
a) The
columns in a database table are called………………………
Ans:
Field
b)
Which is the suitable data type to store video?
Ans:
OLE object
c)
…………… object of MS-Access is used to print formatted data.
Ans:
Report
d)
Which is not a type of query?
Ans:
Search
9.
Match the following:
a)
Query i)
Printed format
b)
Form ii)
Stores data
c)
Table iii)
Allows view, edit, input data
d)
Report iv)
Extracts selected record for view
v)
DBMS
Answer
a)
Query Extracts
selected record for view
b)
Form Allows
view, edit, input data
c)
Table Stores
data
d)
Report Printed
format
10.
a) What is a loop?
Ans:
Loop can de defined as repeating the statement of statement blocks for a number
of times.
b) Write the functions of NAME and CLOSE
statements.
Ans:
The function of NAME statement is to renames a file on a
diskette. The function of CLOSE statement is to close one or all
open files.
c) What
is variable?
Ans: The data item whose value changes during the
execution of a program is called variable.
11.
Re-write the given program after correcting the bugs:
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
Debugged
Program
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
12.
Write the output of the following program.
DECLARE
FUNCTION AREA (L, B)
CLS
LET L =
50
LET B =
10
LET ans
= “; ans
PRINT
“The area=”; ans
END
FUNCTION
AREA (L, B)
Ar=L*B
AREA=ar
END
FUNCTION
Output
The
area = 500
13.
State the following program and answer the given questions:
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 used in the above program are A, B and Difference
List
the local variables used in the above program.
Ans:
The local variables used in the above program is A, B and Difference
14
a)
Write a program to calculate the area of four walls using Sub….End Sub. [Hint:
Area=2H(L+B)
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 to input a word in the main module and count the total number of
vowel characters present in the word 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
c)
Create a data file to store the records of few employees having Name, Address,
Post, Gender and Salary fields.
OPEN
“std.rec” FOR OUTPUT AS #1
DO
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$
LOOP
WHILE UCASE$(CH$)=”Y”
CLOSE
#1
END
Solved
SEE 2074 [Computer Science]
Solved
SEE 2074 [Computer Science]
Group A
Computer
Fundamentals (22 Marks)
1.
Answer the following questions: [5×2=10]
a. Define computer network.
Ans: Computer network can be defined as a connection between computers and other
electronic devices to share the resources and information.
b. Define Internet.
Ans: A global computer network providing a variety of information and communication
facilities is called internet.
c. Write the importance of power protection device to protect computer system.
Ans: The importance of power protection device to protect computer system are:
i) To protect the hardware against damage from unexpected power failures.
ii) To protect files and programs being corrupted due to sudden power failure.
d. What is computer virus? Mention any two symptoms that can be seen when a computer is infected by computer virus.
Ans: A computer program which is capable of copying itself and typically has a detrimental
effect, such as corrupting the system or destroying data. Or any other suitable answer.
Two symptoms of computer virus in a computer are:
i) Unexpected computer behavior
ii) Computer becomes slower
e. What is cyber crime? Give any two examples.
Ans: The criminal activities involving the information technology with the help of computer is
known as cyber crime.
Any two examples of cyber crimes are: software piracy and hacking
2.a) Perform the conversion as per the direction: [2×1=2]
a. Define computer network.
Ans: Computer network can be defined as a connection between computers and other
electronic devices to share the resources and information.
b. Define Internet.
Ans: A global computer network providing a variety of information and communication
facilities is called internet.
c. Write the importance of power protection device to protect computer system.
Ans: The importance of power protection device to protect computer system are:
i) To protect the hardware against damage from unexpected power failures.
ii) To protect files and programs being corrupted due to sudden power failure.
d. What is computer virus? Mention any two symptoms that can be seen when a computer is infected by computer virus.
Ans: A computer program which is capable of copying itself and typically has a detrimental
effect, such as corrupting the system or destroying data. Or any other suitable answer.
Two symptoms of computer virus in a computer are:
i) Unexpected computer behavior
ii) Computer becomes slower
e. What is cyber crime? Give any two examples.
Ans: The criminal activities involving the information technology with the help of computer is
known as cyber crime.
Any two examples of cyber crimes are: software piracy and hacking
2.a) Perform the conversion as per the direction: [2×1=2]
b) Perform the binary calculations: [2×1=2]

3. Match the following: [4×0.5=2]
Group 'A' Group 'B'
a) RJ 45 connector i) Duplicate copy
b) Backup ii) Multimedia
c) Microphone iii) Twisted pair cable
d) Hub / switch iv) Ring Topology
v) Star Topology
Answers:
Group 'A' Group 'B'
a) RJ 45 connector i) Twisted pair cable
b) Backup ii) Duplicate copy
c) Microphone iii) Multimedia
d) Hub / switch iv) Star Topology
4. Select the best answer of the following: [4×0.5=2]
a) Which of the following is not a network protocol?
i) POP ii) FTP iii) TCP/IP iv) NOS
Ans: NOS
b) Which of these software is used for photo editing?
i) Ms-Excel ii) Photoshop iii) Power-Point iv) MS-Word
Ans: Photoshop
c) Which device is used to connect multiple networks that use the same protocol
i) Bridge ii) NIC iii) Switch iv) Gateway
Ans: Bridge
d) Process of arranging the scattered files into a contiguous manner.
i) Scandisk ii) Backup iii) Defragmentation iv) Debugging
Ans: Defragmentation
5. Write the appropriate technical terms of the following: [4×0.5=2]
a) The physical layout of local area network.
Ans: Topology
b) The business conducted through internet.
Ans: E-commerce
c) The law which controls the crime which is done with the help of computer and Internet.
Ans: Cyber law
d) A computer or device which provides different services to other computers connected to the
network.
Ans: Server
6. Write the full form: [4×0.5=2]
a) SMTP: Simple Mail Transfer Protocol
b) WAN : Wide Area Network
c) URL : Uniform Resource Locator
d) VOIP : Voice Over Internet Protocol
Group B
Database
(10 Marks)
7.
Answer the following questions: [3×2=6]
a) Define database.
Ans: Database can be defined as an organized collection of data which can be easily accessed, managed and updated.
b) What is data redundancy? How can it be reduced in database?
Ans: The repetition of same piece of data in a database in more than one location is called data redundancy. Data redundancy can be minimized by normalization of database.
c) Mention any four data types that can be used in Ms-Access.
Ans: Any four data types that can be used in Ms-Access are
i) Text
ii) Memo
iii) Currency
iv) Number
8. Select the correct answer: [4×0.5=2]
a) Which if the following is not accepted by primary key?
i) Number ii) Text iii) Null value iv) None
Ans: Null value
b) Which is called rows in database table?
i) Field ii) Record iii) Form iv) None
Ans: Record
c) Which data type consumes the least storage space?
i) Text ii) Yes/No iii) OLE object iv) Memo
Ans: Yes/No
d) Which is the default data type of Ms-Access?
i) Memo ii) Number iii) Text iv) Auto number
Ans: Text
9. Match the following: [4×0.5=2]
Group 'A' Group 'B'
a) Data i) Input, view, edit data
b) Form ii) Formatted output
c) Report iii) Collection of raw facts
d) Table iv) Questions to the database
v) Stores data in database
Answers:
Group 'A' Group 'B'
a) Data i) Collection of raw facts
b) Form ii) Input, view, edit data
c) Report iii) Formatted output
d) Table iv) Stores data in database
a) Define database.
Ans: Database can be defined as an organized collection of data which can be easily accessed, managed and updated.
b) What is data redundancy? How can it be reduced in database?
Ans: The repetition of same piece of data in a database in more than one location is called data redundancy. Data redundancy can be minimized by normalization of database.
c) Mention any four data types that can be used in Ms-Access.
Ans: Any four data types that can be used in Ms-Access are
i) Text
ii) Memo
iii) Currency
iv) Number
8. Select the correct answer: [4×0.5=2]
a) Which if the following is not accepted by primary key?
i) Number ii) Text iii) Null value iv) None
Ans: Null value
b) Which is called rows in database table?
i) Field ii) Record iii) Form iv) None
Ans: Record
c) Which data type consumes the least storage space?
i) Text ii) Yes/No iii) OLE object iv) Memo
Ans: Yes/No
d) Which is the default data type of Ms-Access?
i) Memo ii) Number iii) Text iv) Auto number
Ans: Text
9. Match the following: [4×0.5=2]
Group 'A' Group 'B'
a) Data i) Input, view, edit data
b) Form ii) Formatted output
c) Report iii) Collection of raw facts
d) Table iv) Questions to the database
v) Stores data in database
Answers:
Group 'A' Group 'B'
a) Data i) Collection of raw facts
b) Form ii) Input, view, edit data
c) Report iii) Formatted output
d) Table iv) Stores data in database
Group C
Programming
(18 Marks)
10. a) What is formal parameter? [1]
Ans: The variable which is used in the function definition is called formal parameter.
b) List any two data types used in C programming language. [1]
Ans: Any two data types used in C programming language are
i) char
ii) int
c) Write the function of KILL and CLOSE statements. [1]
Ans: The function of KILL is to delete the file
The function of CLOSE is to close any opened file
11. Re-write the given program after correcting the bugs: [4×0.5=2]
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
Debugged Program:
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
12. Write the output of the following program: [2]
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:
CMUE
13. Study the following program and answer the given questions: [2×1=2]
DECLARE FUNCTION SUM (N)
CLS
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
a) State the purpose of suing variable S in line 4 in above program.
Ans: Variable S is used to store the value returned by the function Sum.
b) Write the use of MOD in the above program.
Ans: MOD is used to get the remainder of the division.
14. a) Write a program to calculate area of a circle using Sub......End Sub. [3]
DECLARE SUB Area (r)
CLS
INPUT "Enter radius of circle", r
CALL Area (r)
END
SUB Area (r)
A = 3.14*r*r
PRINT "Area of circle :" ; A
END SUB
b) Write a program using FUNCTION.....END FUNCTION to count the number of words in a sentence. [3]
DECLARE FUNCTION WCount (S$)
CLS
INPUT "Enter a sentence", S$
C = WCount (S$)
PRINT "The number of words is :" ; C
END
FUNCTION WCount (S$)
W = 1
FOR I = 1 To LEN (S$)
C$ = MID $ (S$, I,1)
IF C$ = " " THEN W = W + 1
NEXT I
WCount = W
END FUNCTION
c) Write a program to store Roll no., Name, Class and Address of any five students. [3]
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
1 comments:
Great blog! Your blog is very informative. Two such tech-related fields are Computer Science and Information technology. Computer science and information technology may appear to the untrained eye to be the same thing.
Post a Comment