SOLVED SEE
COMPUTER SCIENCE 2081
(Group 'A')
1. Answer the following questions in one
sentence: 6×1=6
a)
What is
telecommunication?
The transmission
of data and information from one place to another for the purpose of
communication is known as telecommunication.
b)
Give any two
examples of simplex mode.
Any
two examples of simples mode are radio and newspaper
c)
Write any two
methods of creating table in MS-Access.
Any two methods
of creating table in MS-Access are design
view and datasheet view
d)
What is the
maximum character you can use for creating a field name in MS-Access?
The
maximum character you can use for creating a field name in MS-Access 64 characters.
e)
Write the syntax
of KILL statement.
The syntax of KILL statement is
KILL “filename”
f)
Write any two
keywords used in C-language.
Any
two keywords used in C language are char and void
2. Write appropriate technical term for
the following: 2×1=2
a)
The
websites that search documents for specified keywords in WWW. Search engine
b)
The
recording of interaction with the digital world. Digital Footprint
3. Write the full form of the following: 2×1=2
a)
UPS
– Uninterruptible Power Supply
b)
VR
– Virtual Reality
(Group 'B')
4. Answer the following questions: 9×2=18
a)
Differentiate
between guided and unguided media.
The
difference between guided and unguided media are:
Guided Media |
Unguided Media |
The media which uses cable or wire to
transfer data and information among computers are called guided communication
media. |
Unguided communication is a communication
channel in which data and information are transferred between two devices
without using wire or cable. |
Examples of guided media are Twisted Pair
Cable, Co-Axial Cable and Fiber Optic Cable |
Examples of unguided media are Radio Wave,
Micor Wave and Satellite Communication |
b)
Define cyber
law. List any one-one do's and don'ts of cyber ethics.
The law which
governs the legal issues in the cyber space regarding the internet or WWW for
digital data processing and transaction is called cyber law.
One
do’s of cyber ethics is
Ask
permission before sharing or using someone else's data or information.
One
dont’s of cyber ethics is
Do
not use a computer to publish fake information.
c)
Define Antivirus
software with two examples.
Antivirus
software
is a program that scans, detects, and removes malicious software from a
computer or device to protect it from security threats.
E.g.
Norton
Antivirus, McAfee Antivirus
d)
Why is
e-commerce more popular than traditional commerce nowadays? Give any two
reasons.
E-commerce
more popular than traditional commerce nowadays because
People
can shop or do business online anytime, from anywhere, without visiting
physical stores.
Online
payments and order processes are quick and efficient.
e)
What is
e-governance? Provide any two examples of e-governance services that exist in
Nepal.
E-Governance
is a set of services provided by the government to public via electronic media
especially using Internet.
Any
two examples of e-governance services that exist in Nepal
Businesses and
individuals can pay their taxes online using the Government of Nepal’s tax
payment portal.
People
can apply for PAN cards online through Nagarik app.
f)
What is
database? Name any two data types used in MS-Access
A collection of systematically organized
inter-related data which store, organize and retrieve data is called a
database.
Any
two data types used in MS-Access are: currency and text.
g)
Write the
difference between field and record. (Any two)
The
difference between field and record are:
Record |
Field |
A record is a row in a table which
contains information about single items in a database. |
A field is a column in a table
which contains information about a certain type for all records. |
Record is complete set of
information. |
Field is a smallest unit of
information. |
h)
Define a report.
Why is it necessary to create a report in DBMS?
Report
is one of the MS-Access database objects used to present information in an
effective and organized format that is ready for printing.
It
is necessary to create report because reports
provide a formatted presentation of data that is easy to read and understand.
It enables users to summarize, analyze, and visualize data in meaningful ways
i)
What is query?
Mention the different types of Action query.
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.
The
different types of Action query are :
- Append Query, Update Query, Delete Query and
Make Table Query
5. Write down the output of the given
program and show them in dry run table: 2
DECLARE
SUB Display (T$)
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
Dry Run Table
T$ |
C = 1 TO LEN (T$)
STEP 2 |
D$=MID$ (T$,C,1) |
PRINT D$; |
COMPUTER |
1 to 8 step 2 yes |
C |
C |
|
3 to 8 step 2 yes |
M |
CM |
|
5 to 8 step 2 yes |
U |
CMU |
|
7 to 8 step 2 yes |
E |
CMUE |
|
9 to 8 step 2 no Loop exits |
|
|
The output of the program is:
CMUE
6. Rewrite the given program after
correcting the bugs: 2
REM
to add record in an existing file.
OPEN
"student.dat" FOR OUT AS #2
TOP:
INPUT
"Enter Name, Class and Roll No."; SName$, C, RN
INPUT#2,
SNames$,C,RN
INPUT
"More records"; Y$
IF
UCASE$(Y$)="Y" THEN GOTO POP
CLOSE
#2
STOP
Debugged Program
REM
to add record in an existing file.
OPEN
"student.dat" FOR APPEND
AS #2
TOP:
INPUT
"Enter Name, Class and Roll No."; SName$, C, RN
WRITE #2, SName$,C,RN
INPUT
"More records"; Y$
IF
UCASE$(Y$)="Y" THEN GOTO TOP
CLOSE
#2
END
7. Study the following program and
answer the given questions. 2
DECLARE
FUNCTION COUNT (A$)
CLS
INPUT
"Enter any word";W$
END
FUNCTION
COUNT (A$)
B =
LEN(A$)
C
= 0
FOR
i=1 TO B
E$=MID$(CS,i,1)
IF
E$ =”A” OR E$ =”E” OR E$ =”I” E$ =”O” OR E$ =”U” THEN
C=C+1
END
IF
NEXT
i
COUNT=C
END
FUNCTION
a)
Write down the
missing statement in the main module to execute the program.
PRINT
COUT(W$) is missing statement in the main module to execute the program
b)
List any two
string functions used in the above program.
MID$(
) and LEN( ) are two string functions used in the above program.
Group
"C"
8. Convert/Calculate as per the
instruction: 4×1=4
i) (1503)8 = (?) 16
Soln:
Convert
every octal digit to 3 binary digits
1
= 001
5
= 101
0
= 000
3
= 011
=
(1101000011)2
Now,
convert
every 4 binary digits to hex digit
0011
= 3
0100
= 4
0011
= 3
=(343)16
(1503)8
= (343) 16
ii) (101000101) 2 = (?) 8
Convert
every 3 binary digits:
101000101
101
= 5
000
= 0
101
= 5
=
5 0 5
(101000101)
2 = (505) 8
iii) (1010 + 1101) 2 - (110) 2
|
1 |
0 |
1 |
0 |
+ |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
|
- |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
(1010
+ 1101) 2 - (110) 2 = (10001)2
iv) (100111) 2 / (110) 2
110) |
1 |
0 |
0 |
1 |
1 |
1 |
(110 |
|
|
1 |
1 |
0 |
|
|
|
|
0 |
0 |
1 |
1 |
1 |
|
|
|
|
|
1 |
1 |
0 |
|
|
|
|
|
0 |
0 |
1 |
1 |
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
1 |
1 |
|
Q
= 110
R
= 11
9. Answer the following questions.
a) Write a program in QBASIC that asks
length, breadth and height of room and calculate its perimeter and volume.
Create a Function procedure to calculate perimeter and Sub procedure to
calculate the volume. [HINT: Volume LxBxH and perimeter = 2(L + B) 4
DECLARE
FUNCTION Perimeter (L, B)
DECLARE
SUB Volume (L, B, H)
CLS
INPUT
"Enter the Length of the room: "; L
INPUT
"Enter the Breadth of the room: "; B
INPUT
"Enter the Height of the room: "; H
P
= Perimeter(L, B)
PRINT
"The Perimeter of the room is: "; P
CALL
Volume(L, B, H)
END
FUNCTION
Perimeter (L, B)
Perimeter = 2 * (L + B)
END
FUNCTION
SUB
Volume (L, B, H)
V = L * B * H
PRINT "The Volume of the room is:
"; V
END
SUB
b) Write a program to read data from the
sequential data file name "std.dat" which contains student's name,
roll no, and marks of English, Nepali, Maths, and Computer of few students.
Display the result with all the information of those students whose marks in
computer is more than 40. 4
OPEN
"std.dat" FOR INPUT AS #1
CLS
DO
WHILE NOT EOF(1)
INPUT #1, N$, RN, ENG, NEP, MATH, COMP
IF COMP> 40 THEN
PRINT N$, RN, ENG, NEP, MATH, COMP
END IF
LOOP
CLOSE
#1
END
10. Write a program in C-language to
find the greatest number among any two different input numbers. 4
#include
<stdio.h>
int
main( )
{
int num1, num2;
printf("Enter the first number:
");
scanf("%d", &num1);
printf("Enter the second number:
");
scanf("%d", &num2);
if (num1 > num2)
{
printf("The greatest number is:
%d\n", num1);
}
else
{
printf("The greatest number is:
%d\n", num2);
}
return 0;
}
(OR)
Write a program in C-language to display
the series 5, 10, 15, 20, ....... up to 15th terms.
#include
<stdio.h>
int
main( )
{
int i, term;
for(i = 1; i <= 15; i++)
{
term = 5 * i;
printf("%d ", term);
}
return 0;
}