SEE Model Question Issued by CDC
Opt. II Computer Science
F.M. : 50
Group ‘A’ (10 Marks)
1. Answer the following questions in one
sentence. [6×1=6]
a) What
is search engine?
A search engine is an online tool that helps users
find information on the internet using keywords or phrases and provide relevant
results.
b) What
is the business done through internet?
The
business done through internet is e-commerce.
c) Which
data type is used to store alpha numeric characters or special symbols in
MS-Access?
The
text data type is used to store alpha numeric characters or special
symbols in MS-Access.
d) Which
view is used to modify a table in MS-Access?
Design
view is used to modify a table in MS-Access
e) What
is modular programming?
Modular
programming is a technique used to divide program into many small, manageable,
logical and functional modules or blocks.
f) Write
any two features of C language.
Any
two features of C language are:
· Portability: C
code can be compiled and executed on different systems with minimal
modifications.
· C is a
case-sensitive programming language. It understands the capital alphabets and
small alphabets as different values
2. Write
appropriate technical terms for the following: [2×1=2]
a) Law that governs the legal issues of cyberspace. Cyber Law
b) The smallest unit to represent information on a
quantum computer Qubit (Quantum bit)
3. Write the full
forms of the following: [2×1=2]
a) STP: Shielded Twisted Pair
b) WAP: Wireless Application Protocol
Group ‘B’ [24 Marks]
4. Answer the
following questions. [9×2=18]
a. What is computer
network? Enlist any two advantages of it.
Any two advantages of computer network are:
· A network
connected computers can share hardware devices such as scanner, printer, hard
disk, etc.
· It also provides the facility of
data and software backup system.
b. What is computer
ethics? Write any two of them.
Computer ethics is a
set of moral principles or code of conducts that regulate the use of computers
systematically without making harm to other users.
Any two cyber ethics are:
· Do not use a computer to publish fake information.
· Do not search the file or record of other people.
c. What is
software security? Write any two measures of hardware security.
Software security means protecting software from being hacked or misused which ensures
the software works properly and keeps data safe.
Any two measures of hardware security are: Insurance and Power
Protection Device
d. What is
M-Commerce? Write any two important services.
M-commerce
(Mobile Commerce)
refers to buying, selling, and conducting business transactions through mobile
devices like smartphones and tablets.
Any two important
services are: mobile banking and mobile shopping.
e. What is IoT?
Write any two importance of it.
IoT (Internet of Things) refers to a
network of interconnected devices that communicate and share data over the
internet.
Any two importance of IoT are:
·
Information is
easily accessible from any place at any time on any device.
· Tasks
can be performed automatically without human intervention.
f. What is
database? Give any two examples.
A collection of systematically organized
inter-related data which store, organize and retrieve data is called a
database. E.g. Dictionary and
Telephone Directory.
g. What is primary
key? List any two advantages of it.
A primary key is a unique field in a
database table that identifies each record uniquely.
Any two advantages of primary key are:
· It sets the
relationship between tables.
· It reduces and
controls duplication of record in a table
h. What is data
sorting? List any two advantages of using it.
The process of arranging all the records
in a table either ascending or descending order based on field or fields is
known as sorting.
Any two advantages of sorting are:
·
Sorting
helps to organize data and make it easier to find and retrieve specific
information.
· Sorting can save
time and improve efficiency by allowing users to quickly access the data they
need.
i. What
type of work is done in MS-Access using form and query object.
· Form provides
graphical interface to view, modify and add data in a table or multiple linked
tables.
· Query is used to
view, retrieve, change and analyze records from a table or multiple linked
tables based on specified condition.
5. Write the output of the given
program: Show with dry run in
table. [2]
DECLARE SUB SHOW(A)
CLS
N=87
CALL SHOW(N)
END
SUB SHOW(A)
DO
B=A MOD 6+3
IF B MOD 4=0 THEN GOTO AA
PRINT B;
AA:
A=A-10
LOOP WHILE A>=50
END SUB
Dry run table
N |
A |
B =A MOD 6+3 |
B MOD 4=0 |
PRINT B; |
A=A-10 |
|
87 |
87 |
87 MOD 6 + 3=6 3+3=6 |
6 MOD 4=0 2=0 NO |
6 |
87-10=77 |
77>=50 yes |
|
77 |
77 MOD 6 + 3 =8 5+3=8 |
8 MOD 4=0 0=0YES |
|
77-10=67 |
67>=50 yes |
|
67 |
67 MOD 6 + 3=4 1+3=4 |
4 MOD 4=0 0=0 YES |
|
67-10=57 |
57>=50 yes |
|
57 |
57 MOD 6 + 3=6 3+3=6 |
6 MOD 4=0 2=0 NO |
6 |
57-10=47 |
47>=50 no |
|
47 |
|
|
|
|
|
The output of a program is:
6 6
6. Re-write the
given program after correcting the bugs: [2]
REM to add record in an existing file
CLS
OPEN “Record.Dat” FOR OUTPUT AS #1
AA:
INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn
INPUT #2, Nm$, Cl, Rn
INPUT “More records”; Y$
IF UCASE$(Y$)=”Y” THEN GOTO aa
CLOSE “Record.dat”
END
Debugged program:
REM to add record in an existing file
CLS
OPEN “Record.Dat” FOR APPEND AS #1
AA:
INPUT “Enter Name, Class and Roll No.”; Nm$, Cl, Rn
WRITE #1,
Nm$, Cl, Rn
INPUT “More records”; Y$
IF UCASE$(Y$)=”Y” THEN GOTO AA
CLOSE #1
END
7. Study the
following program and answer the given
questions. [2×1=2]
OPEN “Detail.dat” FOR INPUT AS #1
OPEN “Temp.dat” FOR OUTPUT AS #2
INPUT “Enter name of the students”; S$
FOR I=1 TO 10
INPUT #1, Nm$, Cl, A
IF S$< >Nm$ THEN
WRITE #2, Nm$, Cl, A
END IF
NEXT I
CLOSE #1, #2
KILL “Detail.dat”
NAME “Temp.dat” AS “Detail.dat”
END
a. What is the main
objective of the program given above?
The main objective of the program is to
delete the record of a specific student, identified by their name from the data
file Detail.dat.
b. Do you get any
problem in the above program if “Kill” statement is removed? Give reason.
Yes, there would be a problem if the KILL
statement is removed. Because without the KILL statement, both Detail.dat and
Temp.dat will exist, and the renaming (NAME "Temp.dat" AS
"Detail.dat") will fail because a file cannot be renamed to an
existing file's name, causing an error and preventing the update.
8. Convert /
Calculate as per the
instruction. [4×1=4]
a. (11001101)2 =
(?)16
Soln:
Converting Binary to octal
Binary
value in four bits |
1100 |
1101 |
Octal
number |
C |
D |
(11001101)2 = (CD)16
b. (524)10 =
(?)2
Soln:
|
|
Remainder |
2 |
524 |
|
2 |
262 |
0 |
2 |
131 |
0 |
2 |
65 |
1 |
2 |
32 |
1 |
2 |
16 |
0 |
2 |
8 |
0 |
2 |
4 |
0 |
2 |
2 |
0 |
2 |
1 |
0 |
2 |
0 |
1 |
(524)10 = (1000001100)2
c. (1010)2 ×
(110)2 – (1011)2 = (?)2
|
|
1 |
0 |
1 |
0 |
|
|
× |
1 |
1 |
0 |
|
|
0 |
0 |
0 |
0 |
|
1 |
0 |
1 |
0 |
× |
+
1 |
0 |
1 |
0 |
× |
× |
1 |
1 |
1 |
1 |
0 |
0 |
|
- |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
1 |
(1010)2 × (110)2 – (1011)2 =
(110001)2
d. (10110)2 ¸ (101)2
101) |
1 |
0 |
1 |
1 |
0 |
(100 |
|
-1 |
0 |
1 |
|
|
|
|
0 |
0 |
0 |
1 |
0 |
|
|
|
|
|
|
-0 |
|
|
|
|
|
1 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quotient=100
Remainder=10
9. a. Write a program
in QBASIC that asks length, breadth and height of room and calculate its area
and volume. Create a user defined function to calculate area and sub-program to
calculate volume. Hint: [A=L×B], [V=L×B×H]
DECLARE FUNCTION AREA(L,B)
DECLARE SUB VOL(L,B,H)
CLS
INPUT “Enter Length”; L
INPUT “Enter Breadth”; B
INPUT “Enter Height”; H
PRINT “Area of room=”; AREA(L,B)
CALL VOL(L,B,H)
END
FUNCTION AREA(L,B)
AREA = L * B
END FUNCTION
SUB VOL(L,B,H)
V=L*B*H
PRINT “Volume of Room=”; V
END SUB
b. A sequential data file called “Record.txt” has stored data
under the field heading Roll No., Name, Gender, English, Nepali, Maths and
Computer. Write a program to display all the information of those students
whose gender is “F” and obtained marks in computer is more than 90.
OPEN “Record.txt” FOR INPUT AS #1
CLS
WHILE NOT EOF(1)
INPUT #1, R, N$, G$, E, N, M, C
IF UCASE$(G$)=”F” AND C>=90 THEN
PRINT R; N$; G$; E; N; M; C
END IF
WEND
CLOSE #1
END
10. Write a program in C language
that asks a number and check whether it is odd or even.
#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 display the series with their
sum.1, 2, 3, 4 upto 10th terms.
#include<stdio.h>
#include<conio.h>
int main()
{
int i, s=0;
i=1;
while(i<=5)
{
printf("%d \n", i);
s = s + i;
i++;
}
print("%d \n Sum=", s);
return 0;
}