PS3031 "A"
SEEPRE-BOARD EXAM 2081
Subject: Computer Science
FM: 50
Time: 2 hrs
Candidates are required to give
their answer according to the given instructions.
Group "A"
1. Answer the following questions
in one sentence:
a. What is web browser?
A web browser is a software
application used to access and view websites on the internet.
b. What is the business conducted
through wireless handheld device?
The business conducted through
wireless handheld devices is called M-commerce.
c. Which data type is used to video
file in MS-Access?
In MS-Access, the data type used to
store a video file is the OLE Object data type.
d. What is Filtering?
Filtering is the process of viewing
required record of a table that matches the specified criteria.
e. Write difference between
function procedure and sub procedure.
A function procedure returns
a value, while a sub procedure does not return any value.
f. Write any two header files of C
language.
The two header files use in C
language are stdio.h and conio.h .
2. Write appropriate technical term
for the following: [2x1=2]
a. It is the act of copying someone
else's work and publishing it as your own work. Plagiarism
b. The process of converting
original representation of the information, known as plaintext, into an
alternative form known as ciphertext. Encryption
3. Write the full form of the
following:
a. ASCII - American Standard
Code for Information Interchange
b. MAC - Media Access Control
Group
"B"
4. Answer the following questions:
a. Define computer network. List
the types of computer network.
A computer network is a system of
interconnected computers and devices that communicate with each other to share
resources, data, and information.
The types of computer network are:
- LAN
(Local Area Network)
- MAN
(Metropolitan Area Network)
- WAN
(Wide Area Network)
b. What is cyber ethics? List any
two of them.
Cyber 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:
v
Do
not use a computer to harm other people.
v
Do
not use a computer to publish fake information.
c. What is computer security? Write
any two measures of hardware security.
Computer security
refers to the protection of computer systems and data from unauthorized access,
theft or misuse and damage and action to
prevent such incidents.
Any two measures of hardware
security are:
Regular Maintenance and Power
Protection Device
d. What is m-computing? Write
advantages of m-computing.
Mobile computing refers to the
use of portable devices like smartphones, tablets, and laptops that let users
access and share data, information, and apps from anywhere, without needing to
stay in one place.
Advantages of m-computing are:
· It allows people to work and communicate from anywhere at
any time.
· It keeps connected to the Internet, allowing to access
information all the times.
e. What is VR? Write two
application areas of VR.
Virtual Reality
(VR) is the use of computer technology to create a simulated environment that
doesn’t actually exist, that can give a feel of near real world with all or
some of senses experiencing the virtually simulated environment.
Two application areas of VR are:
·
Gaming- VR Gaming allows players to immerse (dip)
themselves in virtual world and interact with environment and characters
·
Education - VR can help students
learn by making the content more engaging and memorable.
f. What is query? List its types.
Query is an object of database that
is used to view, retrieve, change and analyze records from a table or multiple
linked tables based on specified condition.
Its types are:
·
Select
Query
·
Action
Query (Append, Update, Delete and Make Table)
g. Define filtering. Write two
examples of it.
Filtering is the process of viewing
required record of a table that matches the specified criteria.
Any two examples of filtering are:
- Displaying
only the students who scored above 90% in a database.
- Showing
products in an online store that are within a specific price range.
h. Define primary key. Write 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
i. What is field and database.
A field is a column in a table
which contains information about a certain type for all records.
A collection of
systematically organized inter-related data which store, organize and
retrieve data is called a database.
5. Write down the output of the
given program. Show with dry-run in table.
CLS
P=1: Q=1
CALL DISP(P,Q)
END
SUB DISP(M,N)
WHILE (N<=5)
PRINT M
M=M*10+N
N=N+1
WEND
END SUB
P |
Q |
M |
N |
N<=5 |
PRINT M |
M=M*10+N |
N=N+1 |
1 |
1 |
1 |
1 |
1<=5 Yes |
1 |
1x10+1 11 |
1+1=2 |
|
|
11 |
2 |
2 <=5 Yes |
11 |
11*10+2 112 |
2+1=3 |
|
|
|
3 |
3<=5 Yes |
112 |
112*10+3 1123 |
3+1=4 |
|
|
|
4 |
4<=5 Yes |
1123 |
1123*10+4 11234 |
4+1=5 |
|
|
|
5 |
5<=5 Yes |
11234 |
11234*10+5 112345 |
5+1=6 |
|
|
|
6 |
6<=5 No Loop Exits |
|
|
|
The output of the program is:
1
11
112
1123
11234
6. Re-write program after correcting the bugs:
REM To display some records from
data file "info.dat"
CLS
OPEN "MARKS.DAT FOR INPUT AS
#1
PRINT "Roll , "Name",
"English"."Nepali", "Maths"
DO WHILE EOF()
INPUT #1,RN,N$,E,N,M
PRINT R,N$.E,Ne,M
END WHILE
CLOSE #1
END
Debugged Program
REM To display some records from
data file "info.dat"
CLS
OPEN "INFO.DAT”
FOR INPUT AS #1
PRINT "Roll , "Name",
"English"."Nepali", "Maths"
DO WHILE NOT EOF(1)
INPUT #1,RN,N$,E,N,M
PRINT RN,N$.E,Ne,M
LOOP
CLOSE #1
END
7. Study the following program and
answer the given questions:
DECLARE SUB TEST (A, B, C)
LET X=4
LET Y=7
LETZ=12
CALL TEST (X, Y, Z)
PRINT X, Y, Z
END
SUB TEST (A, B, C)
A=A+3
B-B+2
SUM=A+B+C
PRINT SUM
END SUB
a. List the arguments and
parameters used in the above program.
The
arguments are: X, Y and Z
The
parameters are: A, B, C
b. List local variables used in
each module.
The local variables used in main
module are X, Y and X
The local variables used in sub procedure
are: A, B, C and SUM.
Group "C"
8. Convert/calculate as per the
instruction:
a. (10101011)2 = (?)16
Convert every 4 binary digits (from
bit0) to hex digit :
10101011
= 1010 1011
1010= A
1011 = B
= AB
(10101011)2 = (AB)16
b. (641)10 = (?)2
Divide by the base 2 to get the
digits from the remainders:
Division |
Quotient |
Remainder (Digit) |
(641)/2 |
320 |
1 |
(320)/2 |
160 |
0 |
(160)/2 |
80 |
0 |
(80)/2 |
40 |
0 |
(40)/2 |
20 |
0 |
(20)/2 |
10 |
0 |
(10)/2 |
5 |
0 |
(5)/2 |
2 |
1 |
(2)/2 |
1 |
0 |
(1)/2 |
0 |
1 |
= (1010000001)2
(641)10 = (1010000001)2
c. (1010) x (11) - (101)
|
1 |
0 |
1 |
0 |
|
|
x |
1 |
1 |
|
1 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
x |
1 |
1 |
1 |
1 |
0 |
d. (101101) / (110)
110) |
1 |
0 |
1 |
1 |
0 |
1 |
(111 |
|
|
1 |
1 |
0 |
|
|
|
|
|
1 |
0 |
1 |
0 |
|
|
|
|
|
1 |
1 |
0 |
|
|
|
|
|
1 |
0 |
0 |
1 |
|
|
|
|
|
1 |
1 |
0 |
|
|
|
|
|
|
1 |
1 |
|
Q = 111
R = 11
9. a. Write a program in QBASIC
that asks for the radius and height of a cylinder and calculates its surface
area and volume. Create a user-defined function to calculate the surface area
and a sub-program to calculate the volume. Hint: Surface Area=2*pi*r* (r+h).
Volume pi*r^2*h]
DECLARE FUNCTION TSA(R,H)
DECLARE SUB VOL(R,H)
CLS
INPUT “ENTER THE RADIUS”;R
INPUT “ENTER THE HEIGHT”;H
PRINT “THE TSA OF CYLINDER IS ”;TSA(R,H)
CALL VOL(R,H)
END
FUNCTION TSA(R,H)
TSA = 2*3.14*R*(R+H)
END FUNCTION
SUB VOL(R,H)
V = 3.14*R^2*H
PRINT “THE VOLUME OF CYLINDER IS ”; V
END SUB
b. A sequential data file called
"Employee.txt" has stored data under the field headings Employee ID,
Name, Gender, Department, and Salary. Write a program to display all the
information of those employees whose salary is greater than 50,000 and the
department is "IT".
OPEN " Employee.txt " FOR INPUT AS #1
CLS
WHILE NOT EOF (1)
INPUT
#1, ID, N$, G$, D$, S
IF
UCASE$(D$) = “TT” OR S>50000 THEN PRINT A ID, N$, G$, D$, S
WEND
CLOSE #1
END
10. Write a program in C language
that asks three integer number and display smallest among three numbers
OR
#include<stdio.h>
#include<conio.h>
int
main()
{
int
a,b,c;
printf("Enter
any three numbers:\n ");
scanf("%d
%d %d" , &a, &b, &c);
if(a<b
&& a<c)
printf("The
smallest number is %d", a);
else
if(b<a && b<c)
printf("The
smallest number is %d", b);
else
printf("The
smallest number is %d", c);
return
0;
}
Write a program in C language to
display reverse of an multi digit integer input number.
#include<stdio.h>
#include<conio.h>
int
main()
{
int
n, s, r;
s=0;
printf("Enter
any number: ");
scanf("%d",
&n);
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
printf("Reverse
digits= %d",s);
return
0;
}
***The End***