PABSON, Kathmandu
SEE PRE-QUALIFYING
EXAMINATION-2080
Subject: Opt. II
Computer Science
Full Marks: 50
Class:
10
Time:
2 hrs.
Candidates
are required to write their answers according to the instructions given.
Attempt
all questions.
(Group 'A'
10x1=10)
1.
Answer the following questions in one sentence: (6x1=6)
a)
What are data communication mode?
Ans:
Data communication modes refer to direction of data flow between devices in a network or
communication system. Simplex, Half Duplex and Full Duplex mode are the types
of communication mode.
b)
What is e-governance?
Ans:
E-Governance
refers to the use of the digital technology by government to enhance the
delivery of public services and engage with citizens more effectively.
c)
List some points about how we can protect our data.
Ans:
Antivirus software can detect and remove virus from the computer.
Software for backup helps in securing the
information by keeping backup.
d)
Which view is used to modify a table structure in MS-Access?
Ans:
Design view is used to modify a table structure in MS-Access.
e)
What is the use of EOF() function?
Ans:
EOF() function is used to test the end of records
with in a file.
f)
Write the features of C language.
Ans:
The features of C language are:
It is a high level
language with some features of low level language.
It is mostly used to prepare system
software.
2.
Write appropriate technical term for the following: (2×1=2)
a)
A device that controls two dissimilar networks. Gateway
b)
A program that destroys other programs. Computer Virus
3.
Write the full form of the following: (2×1=2)
a)
G2B - Government-to-Business
b)
FTP - File Transfer
Protocol
(Group 'B')
4.
Answer the following questions: (9x2=18)
a)
Classify computer network on the basis of geographical location and explain it.
Ans:
Computer network can be classified on the basis of geographical location are
LAN, MAN and WAN.
LAN (Local Area Network)
Local Area Network is a network that connects a group of computers in a
small geographical area like a room, a building, school, etc. Computer lab
networking and cyber networking are examples of LAN.
MAN (Metropolitan Area Network)
Metropolitan Area Network (MAN) is a network of
computer spread over a city or town located in the same geographical area . Cable TV network and branches of banks are examples of MAN.
WAN (Wide Area Network)
A wide area network (WAN) is a computer network that
covers a large geographical area comprising a region, a country, a continent or
even the whole world . Internet, 4G Mobile Broadband Systems and satellite
communication are the best examples of WAN.
b)
What is cybercrime? Write two examples of cybercrime.
Ans:
Cybercrime refers to criminal activities or illegal actions that are conducted
or facilitated through the use of digital technology or the internet.
Any
two examples of cyber crime are: Software piracy, hacking.
c)
Mention the benefits and limitation of E-Commerce.
Ans:
The benefits of E-Commerce are:
It
makes buying/selling possible 24/7.
It makes buying selling procedure faster,
as well as easy to find products.
The limitations of E-commerce are:
Need to be careful about the quality of
product and service delivery.
We cannot do any
transaction without Internet access device.
d)
What is biometric verification?
Ans:
Biometric verification is a method of confirming an
individual's identity by analyzing and measuring unique physical or behavioral
characteristics like fingerprints, facial patterns and voice
e)
What is IoT? Write any two importance of it.
Ans:
IoT is a
technology that connects all electronic devices together and prompts them to
exchange information without any human intervention.
Any
two importance of Iot are:
It reduces
the human effort, so it saves a lot of time.
Information is
easily accessible from any place at any time on any device.
f)
What is database? Give some example of database.
Ans:
Database is an organized collection
of related data that is designed to efficiently store, manage and retrieve
organized information for multiple purposes.
E.g.
Dictionary, Marks Ledger, Telephone Directory Encyclopedia, etc.
g)
What is query? List the different type of query.
Ans:
Query is an object of Ms-Access that
is used to view, retrieve, change and analyze records from a table or multiple
linked tables bases on a specified condition.
The different types of query are:
i) Select query ii) Action query
In action query, we have update query, append query, delete query and
make-table query.
h)
List any two major differences between forms and reports.
Ans:
Any two major differences between forms and reports are:
Form |
Report |
Form
is primarily used for entering data. |
Report
is used for presenting and printing the data. |
Data
can be modified through the form |
Data
cannot be modified through report. |
i)
What is a data type? List any four data types used in MS-Access.
Ans:
Data type is an attribute for a
field that determines the type of data that can be stored in that field.
Any four data types used in
MS-Access are: text, memo, date/time and currency.
5.
Write down the output of the given program. \Show with dry run in table. (2)
DECLARE
SUB PATTERN(SS)
CLS
B$="PROGRAM"
CALL
PATTERN(B$)
END
SUB
PATTERN(S$)
H=LEN(S$)
I=10
FOR
J=1 TO H STEP 2
H=H-2
PRINT
TAB(I); MID$(S$,J,H)
I=I+1
NEXT
J
END
SUB
B$ |
S$ |
H |
I |
J=1
to 7 step 2 |
PRINT
TAB(I); MID$(S$,J,H) |
PROGRAM |
PROGRAM |
7 |
10 |
1 |
MID$(S$,1,5) PROGR |
|
|
5 |
11 |
3 |
MID$(S$,3,3) OGR |
|
|
3 |
12 |
5 |
MID$(S$,5,1) G |
|
|
1 |
13 |
7 |
MID$(S$,7,-1) - |
|
|
-1 |
14 |
9
[Loop Exits] |
|
The
output of the program is:
PROGR
OGR
G
6.
Re-write the given program after correcting the bugs: (2)
REM
to count total no. of passed student
WHILE
NOT EOF()
OPEN
"pab.txt" FOR OUTPUT AS#1
INPU
T#2,ID,M1,M2,M3
IF
M1>=32, M2>=32, M3>=32 THEN
X=X+1
END
IF
WEND
PRINT
"TOTAL RECORD";X
END
Debugged
Program
REM
to count total no. of passed student
OPEN
"pab.txt" FOR INPUT AS #1
WHILE
NOT EOF ( 1 )
INPUT
#1, ID, M1, M2, M3
IF
M1>=32 AND M2>=32 AND M3>=32 THEN
X=X+1
END
IF
WEND
PRINT
"TOTAL passed RECORD";X
CLOSE
#1
END
7.
Study the following program and answer the given questions:
DECLARE
SUB FACTORS(N)
N=10
CALL
FACTORS(N)
END
SUB
FACTORS(N)
FOR
J=1 TO N
R=N
MOD J
IF
R=0 THEN PRINT J;
NEXT
J
END
SUB
Questions:
a)
Write down the use of MOD in the program.
Ans:
The use of MOD in the program is to determine the
remainder of a division operation.
b)
How many time the loop executes in the above program?
Ans:
The loop executes 10 times in the above program.
(Group 'C)
8.
Convert/calculate as per the instruction:
i).
(101011+1101)-(10011)
ii)
(11011×11)¸(101)
iii)
(235)10 into octal
iv)
(9A5)16 into binary
9.a)
Write a program in QBASIC that asks two numbers to find sum of squares of two
numbers using SUB....END SUB program and average of two numbers using
FUNCTION...END FUNCTION.
DECLARE
SUB SQU(A, B)
DECLARE
FUNCTION AVG(A, B)
CLS
INPUT
“Enter first number”; A
INPUT
“Enter Second number”; B
CALL
SQU(A,B)
PRINT
“Average of two numbers=”; AVG(A, B)
END
SUB
SQU(A, B)
S=A^2
+ B^2
PRINT
“Sum of squares of two numbers=”; S
END
SUB
FUNCTION
AVG(A, B)
AVG=(A+B)/2
END
FUNCTION
b)
Write a program to open data file tmp.dat which may contain name, address,
phone no. and salary. The program should allow user to add few records on it.
(4)
OPEN
“tmp.dat” FOR APPEND AS #1
DO
CLS
INPUT
“Enter name”; N$
INPUT
“Enter address”: A$
INPUT
“Enter phone number”; P
INPUT
“Enter salary”; S
WRITE
#1, N$, A$, P, S
INPUT
“Do you want to add more records(Y/N)”; CH$
LOOP
WHILE UCASE$(CH$) = ”Y”
CLOSE
#1
END
10.
Write a program in 'C' to check whether a number is odd or even. (4)
#include<stdio.h>
#include<conio.h>
int main()
{
int n;
printf("Enter any number: ");
scanf("%d", &n);
if(n % 2= = 0)
printf("%d is even number", n);
else
printf("%d is odd number", n);
return 0;
}
or
Write
a program in 'C' language to find sum of first ten natural numbers.
#include
<stdio.h>
int
main()
{
int i, sum = 0;
for (i = 1; i <= 10; i++) {
sum += i;
}
printf("The sum of first ten natural
numbers is: %d ", sum);
return 0;
}
No comments:
Post a Comment