National
PABSAN, Bagmati Province
SEE
Pre-Board Examination - 2080
Time: 2 hours
Subject: Opt.
Computer Science
Candidates are
required to give their answers in their own words as far as practicable, The
figures in the margin indicate full marks for the question.
GROUP A [10 X1=10]
1. Answer the
following questions in one sentence:
a) What is a web
browser?
Web browser is a
computer program that access web pages and displays them on the user’s
computer.
b) List any two
commandments of computer ethics.
Any two
commandments of computer ethics.
Do not use a computer
to publish fake information.
Do not search the file
or record of other people.
e) Which data type
is used in MS-Access to store address of a person?
Memo data type is
used in MS-Access to store address of a person.
d) What is a
RDBMS?
RDBMS is a type of
DBMS that uses a relational model to organize and manage data, allowing users
to easily retrieve and manipulate it.
c) What is a
global variable?
A variable in main
module which can be accessed from any module or procedure of a program is known
as a global variable.
f) Which mode is
used to add data items into the already existed data file in QBASIC?
APPEND mode is
used to add data items into the already existed data file in QBASIC
2. Write
appropriate technical terms for the following:
a) The amount of
data transmitted per second through the communication channel. Bandwidth
b) The process of
making copies of data or data files to use in the event the original data or
data files are lost or destroyed. Backup
3. Write the full
forms for the following:
a) CCTV : Closed
Circuit Television
b) SIM :
Subscriber Identity Module
GROUP B (12 X
2=241
4. Answer the
following questions:
a) What is
computer security? Write any two software security measures.
Computer security refers to protecting computer and its content from
damage, theft or misuse and action to prevent such incidents.
Any two software
security measures are: Password and Backup
b) List four ways
to stay safe on social networks.
Any four ways
to stay safe on social networks
· Pick strong passwords and
update them frequently.
· Report harassment or
inappropriate content.
· Pause before you post.
· Look before you click.
e) What is
m-commerce? Give two examples of digital wallets used in Nepal.
M-Commerce refers to the process of buying and selling of goods and services through
wireless handheld devices such as smartphones, tablets or personal digital
assistants (PDAs).
Any two examples
of digital wallets used in Nepal are e-sewa and Khalti.
d) What is cloud
computing? Write any two examples of Al.
Cloud computing is
a technology that allows users to access and use of computing resources, like
servers and software, over the internet.
Any two examples
of Al are: speech recognition (like Siri, Microsoft Cortana, Amazon Echo,
Google Home etc.),
And self-driving
cars.
e) Define ring
topology. Write its two advantages.
The type of
topology in which each computer is connected to another computer with the last
one connected to the first is called ring topology.
Any two advantages
of ring topology are:
l In this topology all computers, in
close loop, act as a client or server to transfer the information.
l Transmitting network is not
affected by high traffic or by adding more nodes.
f) What is a
foreign key? Write two properties of primary key.
A foreign key in
MS Access is a field that establishes a relationship between two tables by
referencing the primary key of another table.
Any two properties
of primary key are:
It sets the relationship between
tables.
It reduces and controls
duplication of record in a table
g) Write any two
differences between data sorting and data filtering.
Sorting |
Filtering |
The process of arranging all the records in a table either
ascending or descending order based on field or fields is known as sorting. |
Filtering is the process of viewing required record of a table
that matches the specifies criteria. |
Sorting affects the entire dataset. |
Filtering only affects the data that is displayed. |
Sorting is often used to make data easier to read. |
Filtering is used to find specific information. |
Sorting can be done in ascending or descending order. |
Filtering has various criteria that can be applied. |
h) Write a
difference between database and DBMS. Give one example of manual database.
Database |
DBMS |
A collection of systematically organized inter-related data is
called a database. |
Database management system (DBMS) is a computerized system that
stores data, processes them and provides information in an organized form |
Besides computers, databases can even be maintained in physical
ledgers, books, or papers. |
In a database management system (DBMS), all the records are
maintained only on a computer. |
In the case of the databases, very less information can be
modified at a time. |
In the database management system (DBMS), a lot of information
can be changed at one time (as it can have many users using it at the same
time). |
Eg. Dictionary, Marks Ledger, Telephone Directory, Attendance
Register etc. |
E.g. MS-Access, Oracle, MS-SQL Server, MySQL, PostgreSQL etc |
Telephone Directory is an example of manual database.
i) What is a Form?
Write two uses of a form.
Form is one of the
MS-Access database objects which provides graphical interface to view, modify
and add data in a table or multiple linked tables.
Any two uses of a
form are:
·
Forms provide an easy-to-use interface for data
entry and manipulation, improving data accuracy and completeness.
·
Forms can include validation rules to ensure
data quality and prevent errors.
5. Write down the
output of the given programs. Show with dry run in a table.
DECLARE SUB
Display(S$)
CLS
S$=”TOEPOHSDRA"
CALL Display (S$)
END
SUB Display(S$)
LET I=48
FOR C=1 TO 4
P=I MOD 7
R$=R$+ MID$(S$, P,
1)
I=I-1
NEXT C
PRINT R$
END SUB
Dry Run
S$ |
I |
C=1 TO 4 |
P=I MOD 7 |
R$=R$+ MID$(S$,
P, 1) |
I=I-1 |
PRINT R$ |
TOEPOHSDRA |
48 |
1 TO 4 yes |
48 MOD 7= 6 |
H |
48-1=47 |
HOPE |
|
|
2 TO 4 yes |
47 MOD 7 = 5 |
HO |
47-1=45 |
|
|
|
3 TO 4 yes |
46 MOD 7= 4 |
HOP |
45-1=44 |
|
|
|
4 TO 4 yes |
45 MOD 7 = 3 |
HOPE |
44-1=43 |
|
|
|
5 TO 4 no Loop exits |
|
|
|
|
The output of a
program is:
HOPE
6. Re-write the
given program after correcting the bugs.
REM Program to add
records to an existing file "Student.dat"
OPEN
"Student.dat" FOR APPEND AS #1
DO
CLS
INPUT "Enter
name: "; N$
INPUT "Enter
Address: "; Ad$
INPUT "Enter
Total Marks: "; TM$
COPY #1, N$, Ad$, TM
INPUT "Do you
want to add more records? Press Y or N: "; CH$
LOOP WHILE UCASE$(CH$)
< > “Y”
CLOSE
"Student.dat"
END
Debugged Program
REM Program to add
records to an existing file "Student.dat"
OPEN
"Student.dat" FOR APPEND AS #1
DO
CLS
INPUT "Enter
name: "; N$
INPUT "Enter
Address: "; Ad$
INPUT "Enter
Total Marks: "; TM
WRITE #1, N$, Ad$, TM
INPUT "Do you
want to add more records? Press Y or N: "; CH$
LOOP WHILE UCASE$(CH$)
= “Y”
CLOSE #1
END
7. Study the given
program and answer the questions it follows.
DECLARE FUNCTION
Calculate (X,Y)
CLS
INPUT "Enter
a multi-digit number"; N
LET S = Calculate
(N,T)
PRINT "The
sum =”; S
END
FUNCTION Calculate
(X,Y)
WHILE X < >
0
R=X MOD 10
Y = Y + R
X=X\10
WEND
Calculate = Y
END FUNCTION
a) List formal
parameters and real parameters of procedure Calculate'.
The formal parameters are X and Y
and real parameters are N and T.
b) What is the
purpose of the above program?
The purpose of the above program is
to display the sum of digit of an input number.
8. Perform the
following as indicated:
a)
(11101011)2=(?)8
b) (65)10=(?)2
c)
(11101)2+(11011)2-(11110)2
d) (111011)2¸(11)2
GROUP
C
9. (a) Write a
program in QBASIC to find out sum of three numbers using SUB procedure and
average of three numbers using FUNCTION procedure.
DECLARE SUB SUM(A,
B, C)
DECLARE FUNCTION
AVG(A, B, C)
CLS
INPUT “Enter first number”; A
INPUT “Enter
second number”; B
INPUT “Enter third
number”; C
CALL SUM(A, B, C)
PRINT Average of
three numbers=”; AVG(A, B, C)
END
SUB SUM(A, B, C)
S=A+B+C
PRINT “Sum of
three numbers=”; S
END SUB
FUNCTION AVG(A, B,
C)
AVG=(A+B+C)/3
END FUNCTION
(b) A sequential
data file, "record.dat." contains several records with data items
name, address, age, and phone number. Write a program to display the records of
students whose age is greater than or equal to 18.
OPEN “record.dat”
FOR INPUT AS #1
CLS
PRINT “NAME”, “ADDRESS”, “AGE”, “PHONE NUMBER”
WHILE NOT EOF(1)
INPUT #1, N$, A$,
AG, PN
IF AG>=18 THEN
PRINT N$, A$, AG, PN
WEND
CLOSE #1
END
10. Write a
program in C language to input length of three rods and display whether the
triangle can be formed by those rods or not. [4]
#include
<stdio.h>
int main() {
float a, b, c;
printf("Enter the length of rod for side
1: ");
scanf("%f", &a);
printf("Enter the length of rod for
side 2: ");
scanf("%f", &b);
printf("Enter the length of rod for
side 3: ");
scanf("%f", &c);
if (a + b > c && a + c > b
&& b + c > a)
{
printf("The triangle can be formed
by rods.\n");
}
else
{
printf("The triangle cannot be
formed by rods.\n");
}
return 0;
}
OR
Write a program in
C language to declare whether the given number is 'Positive', 'Negative' or
'Zero'.
#include<stdio.h>
#include<conio.h>
int main()
{
int n;
printf("Enter any number: ");
scanf("%d", &n);
if(n>0)
printf("%d is positive number",n);
else if(n<0)
printf("%d is negative number",n);
else
printf("%d is zero number",n);
return 0;
}
At least one of the C program should be related to series.
ReplyDeleteInteresting insights on enhancing gaming experience! For anyone looking to optimize their setup, Better Joy is a must-try for better controller management!
ReplyDelete