Monday, February 6, 2023

SOLVED PABSON SEE PRE-BOARD EXAM-2079 - COMPUTER SCIENCE

 


SOLVED PABSON SEE PRE-BOARD EXAM-2079  - COMPUTER SCIENCE

 

| Subject: Opt. II Computer Time: 1 hrs. 30 minutes

 

Full Marks: 50

 

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

 

Attempt all questions.

 

Group A

 

1. Answer the following questions in one sentence.

 

a) Where does intranet has been used?

Ans: Intranet has been used to share internal information and resources within an organization.

 

b) Write any two benefits of cloud computing.

Ans: Any two benefits of cloud computing are

            Reduced cost

            Enhanced data security

 

c) Which data type is used to store date of birth of an employee in MS-Access?

Ans: Date/Time data type is used to store date of birth of an employee in MS-Access

 

d) Write any two data type used in MS-Access database ?

Ans: Any two data type used in MS-Access database are text and number

 

e) What are procedure in QBASIC?

Ans: The procedure used in QBASIC are SUB procedure and FUNCTION procedure

 

f) Write any two features in 'C' language.

Ans: Any two features in 'C' language

a)     It is mostly used to prepare system software.

b)     It occupies less memory space.

 

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

 

a) The protocol that makes the network communication possible. TCP/IP

b) Digital marks created while using Internet. Digital Footprint

 

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

 

 

(a) ISDN – Integrated Services Digital Network

 

b) TCP/IP – Transmission Control Protocol / Internet Protocol

 

 

 

Group B

 

Answer the following question in short. 9x2=18

 

a) Differentiate between peer to peer and client-server network with figure.

 

client-server network

peer to peer network

Client/ server network is a type of network model where at least one computer is designed as a server and other computers on the network called clients or workstations.

It provides central security administration and the network administrator is responsible for data security and other resources management of the network.

Peer-to-Peer network is a type of network model where all the computers have equal responsibilities on the network.

It lacks centralized network administration, where the network administrator needs to manage security on each computer.

It provides no reliable security and might put data in higher risks.

 

b) What is cyber ethics? Give any two example of it.

Ans: Cyber ethics is a set of moral principles or code of conducts that regulate the use of computers systematically without making harm to other users.

Any two examples of computer ethics are

Do not use a computer to harm other people.

Do not use a computer to publish fake information.

 

(c) What is software security? Write any two measures of 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.

Any two measures of software security are:

keep the backup copy of important data or software

use antivirus software and update frequently

 

(d) Define E-Commerce ? Write its importance.

Ans: Ecommerce refers to the buying and selling of goods or services using the internet.

The importance of e-commerce is it makes buying/selling possible 24/7. It makes buying selling procedure faster, as well as easy to find products.There are no geographical boundaries for e-business. Anyone can order anything from anywhere at any time.

 

e) Why mobile computing is necessary in present time? Write any two importance of it.

Ans; Mobile computing is important now because it lets people use their phones or tablets to get things done from anywhere, anytime, making life easier and more efficient.

Any two importance of mobile computing are:

We can stay connected to all sources at all times.

We can interact with a variety of users via the Internet.

 

f) Differentiate between Primary key and Foreign key with example.

Primary key

Foreign key

A primary key generally focuses on the uniqueness of the table.

A foreign key is generally used to build a relationship between the two tables.

The primary key doesn’t allow null values.

Foreign key accepts multiple null values.

It can identify the record uniquely in the database table.

A foreign key is a field in the table that is the primary key in another table.

For example, in a table of employees, each employee might have an ID number as their primary key.

For example, in a table of orders, the foreign key might be the customer ID number, linking the orders table to a table of customer information.

 

 

g) What is query? List any two advantages of it.

Ans; Query is an object of Ms-Access which extracts and arranges information from a table in a manner that is specified.

Any two advantages of query are:

a)     We can filter, perform calculations and summarize data.

b)     To perform mass update, delete or append new records to a table.

 

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

Ans: Data sorting is the process of arranging the record in ascending or descending order according to a given field or fields. Sorted data is easier to handle than unsorted data.

The advantages of sorting are:
i) It helps to find specific information quickly.
ii) Sorted data is easier to handle than unsorted data.

 

i) Define form. Write its importance

Ans; Form is an object of Ms-Access which provides graphical interface to enter data into the tables or multiple linked tables.

The importance of form are:

a)     It provides an interactive platform for input of data into the database.

b)     It helps to display data in more presentable form than a datasheet.

 

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

 

DECLARE SUB SERIES ()

CLS

CALL SERIES

END

 

SUB SERIES ( )

X=1

Y=2

FOR P 1 TO 10

PRINT X:

X=X+Y

Y=Y+1

NEXT P

END SUB

 

Dry run

Variable

Variable

Variable

Loop Check

Output

X

Y

P

1 TO 10

 

1

2

1

1 TO 10 Yes

1 3  6  10  15  21  28  26  45  55

3

3

2

2 TO 10 Yes

 

6

4

3

3 TO 10 Yes

 

10

5

4

4 TO 10 Yes

 

15

6

5

5 TO 10 Yes

 

21

7

6

6 TO 10 Yes

 

28

8

7

7 TO 10 Yes

 

36

9

8

8 TO 10 Yes

 

45

10

9

9 TO 10 Yes

 

55

11

10

10 TO 10 Yes

 

66

12

11

11 TO 10 No

Loop Exits

 

 

Output

1 3  6  10  15  21  28  26  45  55

 

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

REM to store record in data file

 

CLS

OPEN "employee.dat" FOR INPUT AS #1

DO

INPUT "Enter Name, address and gender": NS, A. G

INPUT #1, NS, A. G

INPUT "Do you want to continue "; Y$

WHILE UCASE$(Y$) = "Y"

CLOSE "employee.dat"

END

 

Debugged Program

CLS

OPEN "employee.dat" FOR OUTPUT  AS #1

DO

INPUT "Enter Name, address and gender": NS, A$, G$

WRITE #1, NS, A$, G$

INPUT "Do you want to continue "; Y$

LOOP WHILE UCASE$(Y$) = "Y"

CLOSE #1

END

 

 

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

 

DECLARE FUNCTION text$(N$)

CLS

INPUT "Enter any string":X$

PRINT text$(X$)

END

 

FUNCTION text$(N$)

FOR i=len (N$) TO 1 STEP-1

W$=W$+MID$(N$,i,1)

NEXT i

text$ = WS

NEXT Q

 

END FUNCTION

 

Questions:

 

a) What is the main objective of above program?

Ans: The main objective of above program is to reverse the string.

 

b) List all the parameters used in above program.

Ans: The parameters used in above program are X$ and N$

 

Group C

 

8. Convert/ Calculate as per the instruction.

a) (10111101) 2 = (2)x

c) ( 10101) 2 X (111)

b) (645) 10 = (?)16

d) (111110) / (110)

 

9. a) Write a program in QBASIC to input length and breadth of room and calculate its area using function and perimeter using sub procedure. [Hint: Area = lxb.

Perimeter = 2(l+b)]

 

DECLARE FUNCTION AREA (L,B)

DECLARE SUB PERI(L,B)

CLS

INPUT “ENTER LENGTH”;L

INPUT “ENTER BREADTH”; B

PRINT “AREA OF RECTANGLE=”; AREA(L,B)

CALL PERI(L,B)

END

 

FUNCTION AREA(L,B)

AREA=L*B

END FUNCTION

 

SUB PERI(L,B)

P=2*(L+B)

PRINT “PERIMETER OF RECTANGLE=”; P

END SUB

 

 

b) A sequential data file called "Records.dat" has stored data under the fieldheading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the records of students whose marks in computer is more than 90.

 

OPEN “Records.dat” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, R, N$, G$, E, N, M, C

IF C>90 THEN PRINT R; N$; G$; E; N; M; C

WEND

CLOSE #1

END

 

 

10. Write a program in C to sum of odd number from 80 to 90.

 

#include <stdio.h>

int main()

{

    int i, s=0;

    for(i=81; i<=90; i=i+2)

s=s+i;

printf("Sum of odd numbers from 80 to 90= %d", s);

    return 0;

}

 

OR

 

 

Write a program in 'C' language to input three number and find greatest number among three numbers.

 

#include <stdio.h>

 

int main()

{

    int a, b, c;

 

    printf("Enter any three numbers");

    scanf("%d %d %d", &a, &b, &c);

 

    if (a > b && a > c)

        printf("%d is the largest number.", a);

 

    else if (b > a && b > c)

        printf("%d is the largest number.", b);

 

    else

        printf("%d is the largest number.",c);

 

    return 0;

}

No comments:

Post a Comment