Saturday, February 11, 2023

Solved National PABSON SEE Pre Board Examination – 2079 COMPUTER SCIENCE

 


Solved National PABSON SECONDARY EDUCATION EXAMINATION BOARD

SEE Pre Board Examination – 2079

COMPUTER SCIENCE

Time: 1:30 Hours       Full Marks: 50

Attempt all the questions.

GROUP ‘A’ -

1. Answer the following questions in one sentence:   [6x1 = 6]

 

a. Give the name of any two guided transmission media.

Ans:Name of any two guided transmission media are:

i)Twisted Pair Cable

ii)Fiber Optic Cable

 

b. What is software security?

Ans: The security given to the software and data from being lost or damaged due to accidental or intentional harm is called software security.

 

c. What is the validation rule in MS-Access?

Ans: Validation rule is a field property which enables to limit values that can be accepted into a field.

 

            d. Which view is used to modify a table structure in MS-Access?

Ans:Design view is used to modify a table structure in MS-Access.

 

            e. Write the function of INPUT # statement.

Ans: The function of INPUT # statement is to read data from the sequential data file.

 

 f. Give the name of any two header files used in C language.

Ans:Name of any two header files used in C language are:

i)<conio.h>

ii)<stdio.h>

 

2. Write appropriate technical term for the following: [2x1  =  2]

            a. The moral principle that controls cybercrime. Computer Ethics

b. Combination of Public and Private clouds. Hybrid Cloud

3. Write the full form of the following:   [2x1  =  2]

            a.         PIN      - Personal Identification Number

            b.         OTP - One Time Password

GROUP ‘B’ -

4. Answer the following questions:   [9x2   = 18]

 

a. Write any two difference between LAN and WAN.

LAN

WAN

Local Area Network is a network that connects a group of computers in a small geographical area like a room, a building, school, etc.

Computer lab networking and cyber networking are examples of LAN.

 

A wide area network (WAN) is a computer network that covers a large geographical area comprising a region, a country, a continent or even the whole world

Internet, 4G Mobile Broadband Systems and satellite communication are the best examples of WAN.

 

 

b. Write any four commandments of computer ethics.

Write any four commandments of computer ethics are:

·       Do not use a computer to harm other people.

·       Do not use a computer to publish fake information.

·       Do not search the file or record of other people.

·      Do not destroy or delete the records of other people.

 

c. What is a computer security? Write any two ways of hardware security ?

Computer security means protecting our computer and its content from damage, theft or misuse and action to prevent such incidents.

Any two ways of hardware security are:

Regular Maintenance and Insurance

 

d.


 

e. What is Internet of Things ? Write any two of its importance.

A technology that connects all electronic devices together and prompts them to exchange information without any human intervention is called Internet of Things.

Any two of its importance are:

a)     Accessing information is easy.

b)     Communication becomes more transparent and easier.

 

f. Define DBMS with any two examples.

DBMS is a software which helps to extract, view and manipulate data in an organized way so that data can be accessed, managed and updated easily.
E.g.: MS-Access, Oracle

g. What is primary key? List any two of its advantages ?

A key that uniquely identifies each record in a database is primary key.

Any two advantages of Primary key are
i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.

 

h. What is data sorting? List any two advantages of using it.

Sorting is the process of arranging the record in ascending or descending order according to a given field or fields. The advantages of sorting are:
i) It helps to find specific information quickly.
ii) Sorted data is easier to handle than unsorted data

 

            i. Identify a record, field and value from the following table structure.

Symbol No.

Name

Marks

00100202S

Aarambha Gharti

85

00100203T

Subash Rayamajhi

91

 

 

 

 

Record = 

00100202S

Aarambha Gharti

85

00100203T

Subash Rayamajhi

91

 

Field = Symbol No., Name and Marks

Value = 85 and 91, Aarambha Gharti and Subash Rayamajhi, 00100202S and 00100203T

 

5.        

Write down the output of the given program and show them in dry run table:     [2]

            DECLARE SUB CITY (K$)

            CLS

            CALL CITY ("KATHMANDU")

            END

            SUB CITY (K$)

            FOR K = 1 TO LEN (K$)

                        C$ = MID$ (K$, K, 1)

            IF K MOD 2 = 1 THEN

                        C$ = UCASE$ (C$)

            ELSE

                        C$ = LCASE$ (C$)

            END IF

                        X$ = X$ + C$

            NEXT K

            PRINT X$

            END SUB

DRY RUN

Var

Var

Loop Check

Var

Condition check

Var

O/P

K$

K

1 to 9

C$

K MOD 2=1

X$

 

KATHMANDU

1

1 to 9 ‘yes’

K

1 MOD 2=1 YES

K

KaThMaNdU

 

2

2 to 9 yes

A

2 MOD 2=1 NO

Ka

 

 

3

3 to 9 yes

T

3 MOD 2=1 YES

KaT

 

 

4

4 to 9 yes

H

4 MOD 2=1 NO

KaTh

 

 

5

5 to 9 yes

M

5 MOD 2=1 YES

KaThM

 

 

6

6 to 9 yes

A

6 MOD 2=1 NO

KaThMa

 

 

7

7 to 9 yes

N

7 MOD 2=1 YES

KaThMaN

 

 

8

8 to 9 yes

D

8 MOD 2=1 NO

KaThMaNd

 

 

9

9 to 9 yes

U

 9MOD 2=1 YES

KaThMaNdU

 

 

10

10 to 9 no

Loop exits

 

 

 

 

 

OUTPUT

KaThMaNdU

 

 

6. Re-write the given program after correcting the bugs: [2]

            REM print the input integer in reverse order

            DECLARE SUB REV (N)

            CLS

            INPUT "Enter an integer number"; NO

            CALL REV (NO)

            END

            SUB REV (N)

            A = N

            WHILE A = 0

R = A MOD 10

S  = S + 10 + R

            A = A \ 10

            NEXT

            DISPLAY "Reverse"; S

            END SUB

 

Debugged program

REM print the input integer in reverse order

DECLARE SUB REV(N)

CLS

INPUT “Enter an integer number”;NO

CALL REV(NO)

END

SUB REV(N)

A=N

WHILE A<>0

R=A MOD 10

S=S*10+R

A=A\10

WEND

PRINT”Reverse”; S

END SUB

7. Study the following program and answer the given questions: [2x1  =  2]

            DECLARE FUNCTION A (X)

            CLS

            X = 5

            Z = A(X)

            PRINT Z

            END

            FUNCTION A (X)

            FOR I = 1 TO X

            S = S + I

            NEXT I

            A = S

            END FUNCTION

a.                If the line S=S+I is changed to S=S+I^2, find the output of it.

Ans:The output will be 55.

b.                How many times does the statement S=S+I execute in the above program?

Ans: The statement S=S+I executes 5 times.

GROUP ‘C’ - ;d"x æuÆ_

8. Convert and calculate as per the instruction:

i) (A2B)16= (?)8

Ans.

Hexadecimal digits: A 2 B

Binary equivalent: 1010  0010 1011

Grouping together : 101000101011

Grouping 3 digits :  101 000 101 011

Octal equivalent: 5 0 5 3

(A2B)16= (5053)8

 

ii) (345)10 = (?)2

Ans.


 

iii) (1011)2 x (101)2 = (?)2

Ans.


iv) (1011010)2 / (101)2

Ans.


 

9)

 a) Write a program in QBASIC that asks length, breadth and height of room and calculates its area and volume. Create a user-defined function to calculate area and sub-program to calculate volume.

Ans.

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 “THE AREA OF ROOM IS ”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 “THE VOLUME OF ROOM IS  ”;V

END SUB

 

b. The employee's name, address, gender, and salary are stored in the "Emp. Dat" sequential data file. Write a QBASIC program that displays all information about personnel whose salaries exceed 50000.

Ans.

OPEN “Emp.Dat” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1,N$,A$,G$,S

IF S > 50000 THEN PRINT N$,A$,G$,S

WEND

CLOSE #1

END

 

10. Write a program in C language to find simple interest where user need to input principal, rate and time.

Ans.

#include<stdio.h>

int main()

{

float p,t,r,s;

printf(“Enter principal”);

scanf(“%f”, &p);

printf(“Enter time”);

scanf(“%f”, &t)

printf(“Enter rate”);

scanf(“%f”, &r);

s = (p*t*r)/100;

printf(“The simple interest is %f”,s);

return 0;

}

 

Write a program in ‘C’ language to display the series with their sum. 1,2,3,4,….., up to 10th terms.

Ans.

#include<stdio.h>

int main()

{

int i,s=0;

for(i=1;i<= 10 ; i++)

{

printf(“\n %d”,i);

s = s + i;

}

printf("The sum of series is %d",s);

return 0;

}

 [ The end ]







1 comment: