Monday, December 25, 2023

Solved PABSON, Kathmandu SEE PRE-QUALIFYING EXAMINATION-2080 Subject: Opt. II Computer Science





 PABSON, Kathmandu

 

SEE PRE-QUALIFYING EXAMINATION-2080

 

Subject: Opt. II Computer Science

 

Full Marks: 50

 

Class: 10

 

Time: 2 hrs.

 

Candidates are required to write their answers according to the instructions given.

 

Attempt all questions.

 

(Group 'A' 10x1=10)

 

1. Answer the following questions in one sentence:                                                                      (6x1=6)

 

a) What are data communication mode?

Ans: Data communication modes refer to direction of  data flow between devices in a network or communication system. Simplex, Half Duplex and Full Duplex mode are the types of communication mode.

 

b) What is e-governance?

Ans: E-Governance refers to the use of the digital technology by government to enhance the delivery of public services and engage with citizens more effectively.

 

c) List some points about how we can protect our data.

Ans: Antivirus software can detect and remove virus from the computer.

Software for backup helps in securing the information by keeping backup.

 

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) What is the use of EOF() function?

Ans: EOF() function is used to test the end of records with in a file.

 

f) Write the features of C language.

Ans: The features of C language are:

It is a high level language with some features of low level language.

It is mostly used to prepare system software.

 

 

2. Write appropriate technical term for the following:    (2×1=2)

 

a) A device that controls two dissimilar networks. Gateway

 

b) A program that destroys other programs. Computer Virus

 

3. Write the full form of the following:                               (2×1=2)

 

a) G2B - Government-to-Business

 

b) FTP - File Transfer Protocol

 

 

 

(Group 'B')

 

4. Answer the following questions:                         (9x2=18)

 

a) Classify computer network on the basis of geographical location and explain it.

Ans: Computer network can be classified on the basis of geographical location are LAN, MAN and WAN.

LAN (Local Area Network)

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.

MAN (Metropolitan Area Network)

Metropolitan Area Network (MAN) is a network of computer spread over a city or town located in the same geographical area . Cable TV network and branches of banks are examples of MAN.

WAN (Wide Area Network)

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) What is cybercrime? Write two examples of cybercrime.

Ans: Cybercrime refers to criminal activities or illegal actions that are conducted or facilitated through the use of digital technology or the internet.

Any two examples of cyber crime are: Software piracy, hacking.

 

c) Mention the benefits and limitation of E-Commerce.

Ans: The benefits of E-Commerce are:

It makes buying/selling possible 24/7.

It makes buying selling procedure faster, as well as easy to find products.

The limitations of E-commerce are:

Need to be careful about the quality of product and service delivery.

We cannot do any transaction without Internet access device.

 

 

d) What is biometric verification?

Ans: Biometric verification is a method of confirming an individual's identity by analyzing and measuring unique physical or behavioral characteristics like fingerprints, facial patterns and voice

 

e) What is IoT? Write any two importance of it.

Ans: IoT is a technology that connects all electronic devices together and prompts them to exchange information without any human intervention.

Any two importance of Iot are:

It reduces the human effort, so it saves a lot of time. 

Information is easily accessible from any place at any time on any device.

 

f) What is database? Give some example of database.

Ans: Database is an organized collection of related data that is designed to efficiently store, manage and retrieve
organized information for multiple purposes.

E.g. Dictionary, Marks Ledger, Telephone Directory Encyclopedia, etc.

 

g) What is query? List the different type of query.

Ans: Query is an object of Ms-Access that is used to view, retrieve, change and analyze records from a table or multiple linked tables bases on a specified condition.

The different types of query are:

i) Select query             ii) Action query
In action query, we have update query, append query, delete query and make-table query.

h) List any two major differences between forms and reports.

Ans: Any two major differences between forms and reports are:

Form

Report

Form is primarily used for entering data.

Report is used for presenting and printing the data.

Data can be modified through the form

Data cannot be modified through report.

 

 

i) What is a data type? List any four data types used in MS-Access.

Ans: Data type is an attribute for a field that determines the type of data that can be stored in that field.

Any four data types used in MS-Access are: text, memo, date/time and currency.

 

5. Write down the output of the given program. \Show with dry run in table.              (2)

 

DECLARE SUB PATTERN(SS)

 

CLS

B$="PROGRAM"

CALL PATTERN(B$)

END

 

SUB PATTERN(S$)

 

H=LEN(S$)

I=10

FOR J=1 TO H STEP 2

H=H-2

PRINT TAB(I); MID$(S$,J,H)

I=I+1

NEXT J

END SUB

 

B$

S$

H

I

J=1 to 7 step 2

PRINT TAB(I);

MID$(S$,J,H)

PROGRAM

PROGRAM

7

10

1

MID$(S$,1,5)

PROGR

 

 

5

11

3

MID$(S$,3,3)

OGR

 

 

3

12

5

MID$(S$,5,1)

G

 

 

1

13

7

MID$(S$,7,-1)

-

 

 

-1

14

9 [Loop Exits]

 

 

The output of the program is:

            PROGR

               OGR

                  G

 

 

 

 

 

 

 

6. Re-write the given program after correcting the bugs: (2)

 

REM to count total no. of passed student

WHILE NOT EOF()

OPEN "pab.txt" FOR OUTPUT AS#1

INPU T#2,ID,M1,M2,M3

IF M1>=32, M2>=32, M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL RECORD";X

END

 

Debugged Program

 

REM to count total no. of passed student

OPEN "pab.txt" FOR INPUT AS #1

WHILE NOT EOF ( 1 )

INPUT #1, ID, M1, M2, M3

IF M1>=32 AND M2>=32 AND M3>=32 THEN

X=X+1

END IF

WEND

PRINT "TOTAL passed RECORD";X

CLOSE #1

END

 

 

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

 

DECLARE SUB FACTORS(N)

N=10

CALL FACTORS(N)

END

 

SUB FACTORS(N)

FOR J=1 TO N

R=N MOD J

IF R=0 THEN PRINT J;

NEXT J

END SUB

 

Questions:

a) Write down the use of MOD in the program.

Ans: The use of MOD in the program  is to determine the remainder of a division operation.

 

b) How many time the loop executes in the above program?

Ans: The loop executes 10 times in the above program.

 

(Group 'C)

 

8. Convert/calculate as per the instruction:

 

i). (101011+1101)-(10011)

 

ii) (11011×11)¸(101)

 

iii) (235)10 into octal

 

iv) (9A5)16 into binary

 

9.a) Write a program in QBASIC that asks two numbers to find sum of squares of two numbers using SUB....END SUB program and average of two numbers using FUNCTION...END FUNCTION.

 

DECLARE SUB SQU(A, B)

DECLARE FUNCTION AVG(A, B)

CLS

INPUT “Enter first number”; A

INPUT “Enter Second number”; B

CALL SQU(A,B)

PRINT “Average of two numbers=”; AVG(A, B)

END

 

SUB SQU(A, B)

S=A^2 + B^2

PRINT “Sum of squares of two numbers=”; S

END SUB

 

FUNCTION AVG(A, B)

AVG=(A+B)/2

END FUNCTION

 

 

b) Write a program to open data file tmp.dat which may contain name, address, phone no. and salary. The program should allow user to add few records on it. (4)

 

OPEN “tmp.dat” FOR APPEND AS #1

DO

CLS

INPUT “Enter name”; N$

INPUT “Enter address”: A$

INPUT “Enter phone number”; P

INPUT “Enter salary”; S

WRITE #1, N$, A$, P, S

INPUT “Do you want to add more records(Y/N)”; CH$

LOOP WHILE UCASE$(CH$) = ”Y”

CLOSE #1

END

 

10. Write a program in 'C' to check whether a number is odd or even. (4)

 

#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;

}

 

 

 

or

 

Write a program in 'C' language to find sum of first ten natural numbers.

 

#include <stdio.h>

int main()

{

   int i, sum = 0;

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

       sum += i; 

   }

 

   printf("The sum of first ten natural numbers is: %d ", sum);

 

   return 0;

}

Solved PABSON, Lalitpur SEE PRE-QUALIFYING EXAMINATION-2080 Computer Science

 



PABSON, Lalitpur

SEE PRE-QUALIFYING EXAMINATION-2080

Subject-Opt. II. Computer Science

Full Marks: 50

Time: 2 hrs

Candidates are required to write their answers according to the instructions given.

Attempt all questions

 

Group A [10 Marks]

 

1. Answer the following questions in one sentence:

 

a) What is mail server?

Ans: A mail server is a computer system that is dedicated to handling and managing the sending, receiving, and storage of emails.

 

b) Why do you connect your PC to the UPS?

Ans: We connect PC to the UPS to control fluctuation of electric voltage and provides enough backup electric power to the computer system when there is power failure.

 

c) What is AI?

Ans: Artificial intelligence refers to the simulation of human intelligence in machines that are programmed to think and act like humans.

 

d) Which object of DBMS is used to print information?

Ans: The object of DBMS which is used to print information is report.

 

c) List the types of procedures.

Ans: The types of procedure are SUB Procedure and FUNCTION Procedure.

 

f) Write a feature of C language.

Ans: A feature is C language is it is mostly used to prepare system software.

 

2. Write the technical term for the following statements:                       

 

a) Device to convert analog signal into digital signal and, vice versa. MODEM

 

b) Making data and information unreadable by unauthorized person. Encryption

 

3. Write the full forms of the following:

 

a) UPS - Uninterruptible Power Supply

 

b) SMTP - Simple Mail Transfer Protocol

 

 

Group B

 

4. Answer the following questions:

 

 

a) What is communication channel? Mention its types with at least one example, each

Ans: A channel or path through which data and information are transmitted between connected devices in a network environment are called communication channel.

Its types are:

Guided (Wired/bounded) communication media - Twisted Pair Cable, Co-Axial Cable and Fiber Optic Cable

Unguided (Wireless/unbounded) communication media - radio wave, microwave, satellite, infrared

b) What is cyber-crime? List any two objectives of formulating cyber law in Nepal.

Ans: Cybercrime refers to criminal activities or illegal actions that are conducted or facilitated through the use of digital technology or the internet.

Any two objectives of formulating cyber law in Nepal are :

- To legalize the transaction through electronic media to control various types of electronic frauds

- To punish a person who does criminal activities through electronic means especially on computers.

 

c) Mention any four hardware security measures.

Ans: Any four hardware security measures are :

a)     Regular Maintenance

b)     Insurance

c)     Air condition system

d)     Power Protection device (Volt guard, Spike guard, UPS)

 

d) What is e-commerce? Write its two limitations.

Ans: E-commerce refers to the buying and selling of goods or services using the internet.

Any two limitations of e-commerce are:

Need to be careful about the quality of product and service delivery.

We cannot do any transaction without Internet access device.

 

 

e) List the types of E-governance. Describe any one of them.

Ans: The types of E-governance are:

·       Government-to-Citizen(G2C)

·       Government-to-business (G2B)

·       Government-to-Government (G2G)

·       Government-to-Employee (G2E)

Government-to-Citizen(G2C)

G2C-is transaction between the government to citizens. It includes online registration of birth/ death/marriage certificates, filling of income taxes, electricity bills, license renewals etc.

 

f) What is DBMS? Write its two advantages.

Ans: DBMS is a software that manages databases, allowing users to store, access, and manipulate data in an organized and secure way.

Any two advantages are:

It controls data redundancy which means duplication of data.

It provides high security of data as well as maintains accurate database

 

 

 

g) Write a similarity and a difference between Number field type and Currency filed type.

Ans: similarity and a difference between Number field type and Currency field type

Similarity:

Both store numerical values: Both field types are designed to store numerical data.

Difference:

            Currency field type is specialized for handling monetary values by including specific currency formats and precision, whereas the Number field type is more generic and can store any numerical data without currency-specific formatting.

 

 

h) What is primary key? Write two examples of primary key fields.

Ans: A primary key is a field or combination of fields in a table that uniquely identifies each record, and is used to establish relationships between tables and enforce data integrity.

Any two examples of primary key fields are SEE Registration number, Username

 

i) Why is query object used in MS-Access? Give two reasons.

Ans: Any two reasons to use query object in MS-Access are:

Queries enable users to retrieve specific data from tables or other data sources, based on specified criteria.

Queries allow users to filter, sort, and group data in meaningful ways.

 

5. Write the output of the given program showing the dry run table. (2)

DECLARE FUNCTION PRO(N)

 

CLS

A=2

FOR J=1 TO 5

X= PRO(A)

PRINT X

NEXT J

END

 

FUNCTION PRO(N)

N=N+2

PRO=N

END FUNCTION

 

            Dry Run

A

J=1 to 5

X

N

N=N+2

PRINT X

2

1

4

2

2+2=4

4

 

2

6

4

4+2=6

6

 

3

8

6

6+2=8

8

 

4

10

8

8+2=10

10

 

5

121

10

10+2=12

12

 

6 loop exits

 

 

 

 

 

Output of the program is

4

6

8

10

12

 

6. Debug the following program

 

Rem to add 5 records in data file HOSPITAL.TXT

OPEN "HOSPITAL.TXT" FOR INPUT AS #5

FOR REP = 1 TO 5

INPUT "ENTER PATIENT NAME":PN$

INPUT "ENTER PATIENT ADDRESS":AD$

INPUT "ENTER PATIENT AGE": A%

INPUT "ENTER PATIENT GENDER":G$

 

STORE #5, PN$,AD$,A, G$

NEXT REP

CLOSE #1

END

 

 

 

 

 

Debugged Program

 

Rem to add 5 records in data file HOSPITAL.TXT

OPEN "HOSPITAL.TXT" FOR APPEND AS #5

FOR REP = 1 TO 5

INPUT "ENTER PATIENT NAME":PN$

INPUT "ENTER PATIENT ADDRESS":AD$

INPUT "ENTER PATIENT AGE": A%

INPUT "ENTER PATIENT GENDER":G$

WRITE #5, PN$,AD$,A%, G$

NEXT REP

CLOSE #1

END

 

7. Read the following program and answer the given questions.

 

DECLARE SUB AA (N$)

W$=CYBERCRIME"

CALL AA(W$)

END

 

SUB AA (N$)

R=LEN(N$) \ 2

E$=RIGHT$(N$,R) + LEFT$(N$,R)

PRINT E$

END SUB

 

Questions:

 

a) List the parameter(s) and argument(s) of the program.

Ans: The parameter used in above program is N$ and argument used in above program is W$.

b) List all the string library functions from the program.

Ans: The string library functions used from the program are LEN ( ), RIGHT$( ), LEFT$( ).

 

 

8. Convert/Calculate as per the instruction:

 

a) (11100001)2 = (?)8

 

b) (A2B)16 = (?)2

 

c) (101) X (111)

 

d) (110110)¸(110)

 

Group C

 

9. a. Write a program in QBASIC to define a function procedure to display the area of sphere and sub procedure to display the volume of sphere where user need to input radius in main module.

[Hint: Area = 4*3.14*R^2, Volume = 4/3*3.14*R^3]

 

DECLARE SUB AREA (R)

DECLARE FUNCTION VOL(R)

CLS

INPUT “Enter Radius”; R

CALL AREA(R)

PRINT “Volume of sphere=”; VOL(R)

END

SUB AREA(R)

A=4*3.14*R^2

PRINT “Area of sphere=”; A

END SUB

 

FUNCTION VOL(R)

VOL=4/3*3.14*R^3

END FUNCTION

 

b. A sequential data file 'PRODUCT.DAT contains the information regarding product Id, Product name, Date of manufacturing and Price of some products. Write a program to display all the records deducting the price by 20%, where price is greater than or equal to Rs.1000. [4]

 

OPEN “PRODUCT.DAT” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, I, N$, D$, P

IF P>=1000 THEN P=P-20/100*P

PRINT I, N$, D$, P

WEND

CLOSE #1

END

 

 

 

10. Write a program using C language to input an integer then check whether the integer is even or odd.

 

 

#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;

}

 

 

 

Write a program using C language to generate the first 25 even numbers between 100 and 200.

 

#include <stdio.h>

 

int main() {

    int i, count = 0;

 

    printf("The first 25 even numbers between 100 and 200 are:\n");

 

    for (i = 100; count < 25; i += 2) {

        printf("%d ", i);

        count++;

    }

 

    printf("\n");

    return 0;

}