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 ]







Friday, February 10, 2023

SOLVED PABSON,SEE PRE-BOARD EXAM- 2079 -COMPUTER SCIENCE -SET D

 

SOLVED PABSON,SEE PRE-BOARD EXAM- 2079 -COMPUTER SCIENCE -SET D



Answer the following questions in one sentence:

1.    In which communication media data transfer is the fastest?

Ans . In Fiber optic cable, data transfer is the fastest.

 

2.    What is cyber-crime?

Ans. Cyber-crime is illegal or malicious activities carried out using the internet or other forms of digital communication technology.

 

3.    What is topology?

Ans. Topology refers to the physical or logical arrangement of devices in a network.

 

4.    What is primary key?

Ans. A primary key is a unique identifier for each record in a database table.

 

5.    . Write the types of parameters?

Ans. The types of parameters are actual and formal parameters.

 

6.    How many keywords are in c language?

Ans. There are 32 keywords in c language.

 

 

 

 

 

A. Write appropriate technical term for the following:

 

1.    A main computer of a computer network.  Server

 

2.    A malicious program of computer that damages data and Software. Malware

 

3.Write the full form of the following:

a) WLAN – Wireless Local Area Network

b) POP – Post Office Protocol

 

B. Answer the following questions.

1.What is data communication? Write the basic elements of data communication.

Ans. Data communication refers to the transfer of data or information from one place to another through a communication channel.

The basic elements of data communication are: sender, receiver, message or data, communication channel and protocol.

 

 

2.What is computer ethics? Write any two commandments of computer ethics.

Ans. Computer ethics is the study of moral principles and values related to the use of technology and computers.

Two commandments of computer ethics are:

-        Do not use a computer to harm other user.

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

 

3.What is digital citizenship? List out the major themes of digital citizenship.

Ans. Digital citizenship refers to responsible and ethical use of technology, including online safety, digital literacy, and respectful online behavior.

Major themes of digital citizenship are :

- Protecting personal information and being aware of online dangers.

- Understanding effective and ethical use of technology.

- Ensuring equal access to technology for all individuals.

- Understanding and following laws and policies related to technology.

4.What is online payment? Write some different modes of electronic payment.

Ans. Online payment refers to the transfer of funds over the internet for the purpose of purchasing goods or services.

 

Some modes of electronic payment are:

- Credit/debit cards allow payment through card networks.

- Mobile payment systems use NFC technology or QR codes for payment through a mobile device.

- Online banking enables payments through a bank's website or mobile app.

- E-wallets are digital wallets for quick, convenient payment.

5.What is hardware security? Write the role of Ups in hardware security.

Ans. Hardware security refers to the physical protection of computer and network devices to prevent unauthorized access, tampering, or theft.

UPS protects hardware security by providing backup power to keep devices running during power outages and prevent data loss.

 

6.What is database? Write any two examples.

Ans. A database is a collection of organized data stored and managed on a computer system.

Two examples of database are : Dictionary and Marks ledger.

 

7.What is table in Access? In how many ways we can create a table in Ms Access?

Ans. A table in Microsoft Access is a database component that stores data in rows and columns, allowing for organization and manipulation of data.

Ways to create a table in Ms Access are :

- Using the Table Design View

- Using the Table Wizard

- Creating a table from a query

8.What is action query? Write its type.

Ans. An action query is a type of query in Microsoft Access that performs specific actions, such as adding, modifying, deleting, or creating a table, on data in a database.

It’s types are :

- Append Query: Adds new records to an existing table.

- Update Query: Modifies existing records in a table.

- Delete Query: Deletes records from a table.

- Make Table Query: Creates a new table based on data from one or more tables.

9.Name any four objects of Ms-Access .

Ans. Four objects of Ms-Access are:

-        Table

-        Query

-        Form

-        Report

 

C. Write down the output of the given program. Show with dry run in table .

 

DECLARE SUB SERI()

CLS

CALL SERI

END

 

SUB SERI

X# = 1

FOR I = 1 TO 5

PRINT X# * X#

X# = X# * 10 +1

NEXT I

END SUB

 

Variable

Variable

Loop Check

Output

X#

i

1 To 5

 

1

1

1 to 5 ‘yes’

1

11

2

2 to 5 ‘yes’

121

111

3

3 to 5 ‘yes’

12321

1111

4

4 to 5 ‘yes’

1234321

11111

5

5 to 5 ‘yes’

123454321

111111

6

6 to 5 ‘no’

 

 

 

Loop exits

 

 

 

Output

1

121

12321

1234321

123454321

 

D. Rewrite the given program after correcting the bugs.

 

REM to create sequential data file "record.dat" to enter some records.

CLS OPEN "record.dat" FOR INPUT AS #1

UP:

INPUT "ENTER NAME";N$

INPUT "ENTER ADDRESS";A$

INPUT "ENTER PHONE NUMBER";PH

WRITE #2, N$,A$,PH

INPUT "Do you want to continue(y/n)?";an

IF LCASE(an$)="y" THEN GOTO UP

CLOSE #1

END

 

Debugged program

REM to create sequential data file "record.dat" to enter some records.

CLS

OPEN "record.dat" FOR OUTPUT AS #1

UP:

INPUT "ENTER NAME";N$

INPUT "ENTER ADDRESS";A$

INPUT "ENTER PHONE NUMBER";PH

WRITE #1, N$,A$,PH

INPUT "Do you want to continue(y/n)?";an$

IF LCASE$(an$)="y" THEN GOTO UP

CLOSE #1

END

 

E. Study the following program and answer the given questions:

DECLARE FUNCTION TEST (A)

X = 10

Z = TEST (X)

PRINT Z

END

 

FUNCTION TEST (B)

 FOR I = 1 TO B

 S = S + I * I

NEXT I

TEST= S

END FUNCTION.

 

Questions:

a)    How many parameters are used in the above program?

Ans. 1 parameter is used in the above program.

b)   How many times does the statement S=S + I * I will be executed in the above program?

Ans. The statement S= S + I * I will be executed 10 times.

 

F. Convert as per instructions.

a) (110111)2 into (?)8

Ans.

Binary digits : 110111

Grouping 3 digits : 110 111

Octal equivalent : 6 7

 

∴ (110111)2 = (67)8

 

b)(25AF)16 into (?)10

Ans.

 

= 2  163 + 5×162 + 10×161 + 15×160

= 2 * 4096 + 5*256 + 10*16 + 15*1

= 8192 + 1280 + 160 + 15

= 9647

(25AF)16 into (9647)10

c)110110 + 100011

Ans.


d)1110001 ÷ 110

Ans.

 




  

G.

i. Write a program in QBasic that ask the radius and height of a cylinder and calculate the volume and curve surface area. Create a user-defined function to calculate volume and sub-procedure to calculate curve surface area of a cylinder. [Hints: V=Ï€r2 h, CSA=2Ï€rh]

Ans.

DECLARE FUNCTION VOL(R,H)

DECLARE SUB CSA(R,H)

CLS

INPUT “ENTER THE RADIUS”;R

INPUT “ENTER THE HEIGHT”;H

PRINT “THE VOLUME OF CYLINDER IS ”;VOL(R,H)

CALL CSA(R,H)

END

 

FUNCTION VOL(R,H)

VOL = 3.14*R*R*H

END FUNCTION

SUB CSA(R,H)

C = 2*3.14*R*H

PRINT “THE CURVE SURFACE AREA OF CYLINDER IS ”; C

END SUB

 

ii. A sequential data file called "Emp.dat" has stored data under the field heading name, post and salary. Write a program to display the records of those employees whose salary is more than Rs. 25000.

Ans.

OPEN “Emp.dat” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1,N$,P$,S

IF S > 25000 THEN PRINT N$,P$,S

WEND

CLOSE #1

END

 

H. Write a program in C language to ask to enter two numbers and find out sum and product.

Ans.

#include<stdio.h>

int main()

{

Int a,b,s,p;

printf(“enter first number “);

scanf(“%d”,&a);

printf(“enter second number ”);

scanf(“%d”, &b);

s = a + b;

p = a * b;

printf(“the sum of two numbers is %d”,s);

printf(“the product of two numbers is %d”,p);

return 0;

}

 

 

Write a C program to ask to enter a number then find out whether it is even or odd.

Ans.

#include<stdio.h>

Int main()

{

Int n;

printf(“enter any number”);

scanf(“%d”,&n);

if(n%2 == 0)

printf(“The given number is even”);

else

printf(“The given number is odd”);

return 0;

}