Solved PABSON SEE PRE-BOARD EXAM -2078
PABSON
SEE PRE-BOARD EXAM -2078
Subject:
Opt II Computer Science Full
Marks: 50
Time :
1.5 hrs
Group ’A’ 10 x 1 = 10
Very
short questions.
1) Give
answer in one sentence for the following question. 6 x1 =6
a) Define bandwidth.
Bandwidth can be defined as the maximum volume of data that can be transmitted through a communication system.
b) What is cyber bulling?
Cyber bullying is a kind of harassment using mobiles or computers.
c) What is AI?
Artificial intelligence (AI) is an area of computer science that emphasizes the creation of intelligent machines that work and reacts like humans.
d) What is the storage size of memo and text data type in MS- Access?
Text can store up to 255 characters and Memo can store up to 65,535 characters
e) What is local variable?
Variables which are declared inside a module and which cannot be accessed by other module are called local variables.
f) What is an operator in C language?
Operator is a symbol that is used to perform mathematical operations.
2) Write
appropriate technical terms for the following. 2 x1=2
a) Secret group of characters which helps to protect file from unauthorized person. Password
b) A type of network in which every computer works as both client and server. Peer to Peer Network
3) Write
the full forms of the following. 2x1=2
i) ADSL – Asymmetric Digital Subscriber Line
ii) TCP/IP – Transmission Control Protocol / Internet Protocol
Group ’B’ 12 x 2 = 24
4) Answer
the following questions. 9 x2 =18
a) Differentiate between LAN and WAN.
LAN |
WAN |
A LAN is a type of network which covers small area i.e. within a room, building, or short distance by using cables or small wireless devices. |
A WAN is a type of network which connects two or more computers generally across a wide geographical area such as cities, districts, and countries. |
E.g.: network in a school, college or cyber cafe. The diameter is not more than a few kilometers. |
E.g. internet. |
b) Write any four commandments of computer ethics.
Any four commandments of computer ethics are:
·
You should not use a computer to harm other
people.
·
You should not search the file or record of
other people.
·
You should not spread false and illegal
information.
·
You should not destroy, erase or edit
personal or group records.
c) What is E- commerce? List any two E- commerce companies in Nepal.
Ecommerce, also known as
electronic commerce or internet commerce, refers to the buying and selling of
goods or services using the internet.
Any two E- commerce companies in Nepal are sastodeal and daraz.
d) What are the advantages of cloud computing?
The advantages of cloud computing are:
·
Cloud
allows us to quickly and easily access, store information anywhere, anytime in
the whole world, using an internet connection.
·
Cloud
computing reduces both hardware and software maintenance costs for
organizations.
e) What is VR? Mention its application areas.
An artificial environment created
with computer hardware and software and presented to the user in such a way that it appears and feels like a
real environment is called Virtual Reality.
Its application areas are:
- It can be used in medical studies to enable students to
know the human body structure.
- It can be used in driving schools as it give a real look
of roads and traffic.
f) What is DBMS? Give any two examples.
Database management system (DBMS) is
a computerized system that stores data process them and provide information in
an organized form.
Any two examples are
MS-Access and Oracle.
g) What is primary key? List any two advantages.
A
key that uniquely identifies each record in a database is primary key.
Any
two advantages of primary key are:
·
To
reduce and control duplication of record in a table.
·
To
set the relationship between tables.
h) What is query?
Query is an object of Ms-Access
which extracts and arranges information from a table in a manner that is
specified.
i) What is data sorting? Write its two advantages.
Sorting
is the process of arranging the record in ascending or descending order
according to a given field or fields.
Any
two advantages of sorting are:
· It helps to find specific information quickly.
· It helps to arrange data in alphabetical order.
5) Write down the output of the given programs.
[2]
DECLARE SUB DISPLAY (A)
CLS
A= 3
CALL DISPLAY (A)
END
SUB DISPLAY (A)
FOR X = 1 TO 6
PRINT A;
IF A MOD 2 = 0 THEN
A=A/2
ELSE
A= (A*3)+1
END IF
NEXT X
END SUB
Dry Run
A |
X=1 TO 6 |
PRINT A; |
IS A MOD 2=0 ? |
Yes (A=A/2) |
No(A=A*3+1)
|
3 |
1 To 6 Yes |
3 |
3 MOD 2=0 1=0 NO |
|
3*3+1=10 |
10 |
2 To 6 Yes |
10 |
10 MOD 2=0 0=0 YES |
10/2=5 |
|
5 |
3 To 6 Yes |
5 |
5 MOD 2=0 1=0 NO |
|
5*3+1=16 |
16 |
4 To 6 Yes |
16 |
16 MOD 2=0 0=0 YES |
16/2=8 |
|
8 |
5 To 6 |
8 |
8 MOD 2=0 0=0 YES |
8/2=4 |
|
4 |
6 To 6 |
4 |
4 MOD 2=0 0=0 YES |
4/2=2 |
|
2 |
7 To 7 No |
Loop terminates |
|
|
|
The output of the program
is:
3 10
5 16 8
4
6)
Re-write the given program after correcting the bugs. [2]
REM to add more data in a sequential file.
OPEN “EMP.DAT” FOR INPUT AS #2
DO
INPUT “ENTER NAME”; N$
INPUT “ENTER ADDRESS”; A$
INPUT “ENTER SALARY”; S$
WRITE #1, N$, A$, S
INPUT” Do you want to add more records.”; M$
LOOP WHILE UCASE(M$) = “Y”
END
Debugged Program
REM to add more data in a sequential file.
OPEN “EMP.DAT” FOR APPEND AS #2
DO
INPUT “ENTER NAME”; N$
INPUT “ENTER ADDRESS”; A$
INPUT “ENTER SALARY”; S
WRITE #2, N$, A$, S
INPUT” Do you want to add more records.”; M$
LOOP WHILE UCASE$(M$) = “Y”
CLOSE #2
END
7) Study
the given program and answer the given questions. [2]
DECLARE FUNCTION test$ (A$)
CLS
INPUT “ENTER ANY WORD”; T$
PRINT test$(t$)
END
FUNCTION test$ (A$)
FOR M = LEN(A$) TO 1 STEP -1
C$= C$+ MID$(A$, M,1)
NEXT M
Test$ = C$
END FUNCTION
a) List the formal and actual parameters used in the program given above.
Formal parameter= A$
Actual parameter = t$
b) List the library function used in the above program.
The library function used in the above program is LEN( ) and MID$( ).
Group
‘C’ [4 x4= 16]
8) Convert/Calculate
as per the instruction: 4 x1 =4
a) (CCA)16into binary
b) (654)10 into octal
c) (111011 / 100)2
d) (10101 - 1110)2 x (10) 2
9) Write
a program in QBASIC that allows user to enter radius of a circle. Create a user
define function to find the area of circle and sub procedure to find volume of
a cylinder. Hint: [A=
DECLARE
FUNCTION AREA (R)
DECLARE
SUB VOL(R, H)
CLS
INPUT “Enter Radius”; R
INPUT
“Height”; H
PRINT
“Area of Circle=”; AREA(R)
CALL
VOL(R, H)
END
FUNCTION
AREA(R)
AREA
= 3.14 * R ^ 2
END
FUNCTION
SUB
VOL (R, H)
V
= 3.14 * R ^ 2 * H
PRINT
“Volume of Cylinder=”; V
END
SUB
10)
A sequential data file “emp.dat” contains employee’s name,
address, gender and salary. WAP to display all the information of employees
whose salary is more than Rs. 20,000
OPEN
“emp.dat” FOR INPUT AS #1
CLS
WHILE
NOT EOF(1)
INPUT
#1, N$, A$, G$, S
IF
S>20000 then PRINT N$, A$, G$, S
WEND
CLOSE
#1
END
11)
Write a program in C language to input any two numbers and find greater number.
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b;
printf("Enter
any two numbers:\n ");
scanf("%d
%d", &a, &b);
if(a > b)
printf("The
greater number is %d", a);
else
printf("The
greater number is %d", b);
return 0;
}
OR
Write
a program in C language that asks user to enter any number and check whether
the number 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;
}
The End
No comments:
Post a Comment