Friday, January 31, 2025

SOLVED PABSON KASKI SEE Computer Science Preparatory Examination 2081

 


SOLVED PABSON KASKI SEE Computer Science Preparatory Examination 2081

Time: 2:00 Hours

Full Marks: 50

GROUP 'A'

1. Answer the following questions:

 

a. What is bandwidth?

Bandwidth is the maximum amount of data that can be transmitted over a network or communication channel in a given amount of time.

 

b. What is online payment?

Online payment refers to the payment for buying goods or services through the Internet using different online payment gateway.

 

c. Write any two methods of creating tables in MS-Access.

Any two methods of creating tables in MS-Access  are: Design view and Datasheet view.

 

d. While designing table structure, which data types are suitable to store information about a student’s name and class?

The suitable data type to store student’s name is text and class is number.

 

e. List the types of procedures used in QBasic Programming.

The types of procedures used in QBasic Programming are: SUB Procedure and FUNCTION procedure.

 

f. How many keywords are used in C language?

There are 32 keywords used in C language.

 

2. Write appropriate technical term for the following:

a. The network security systems that monitor and controls the traffic flow between the internet and private network. Firewall

b. System of interrelated computing devices with unique identifiers that transfer data over a network without human intervention. IoT (Internet of Things)

 

3. Write the full form of the following:

a. HTTP – Hypertext Transfer Protocol
b. CCTV – Closed-Circuit Television

 

GROUP 'B'

4. Answer the following questions:

 

a. Differentiate between Guided and Unguided Media.

 

Guided Media

Unguided Media

The media which uses cable or wire to transfer data and information among computers are called guided communication media.

Unguided communication is a communication channel in which data and information are transferred through the air.

Examples of guided media are Twisted Pair Cable, Co-Axial Cable and Fiber Optic Cable

Examples of unguided media are Radio Wave, Micro Wave and Satellite Communication

 

b. Mention any two threats and two opportunities of using social media.

Opportunities of using social media

Networking: Connect globally, build relationships, and join communities.

Marketing and Branding: Promote businesses and engage with customers.

Threats of using social media

Privacy Risks: Personal information can be exposed or misused.

Cyberbullying: Harassment or bullying through online interactions.

c. What is hardware security? List any two software security measures.

Hardware security refers to the protection of the physical components of a computer or electronic device from unauthorized access, theft, or damage.

Any two software security measures are password and backup.

 

d. What is Cloud computing? Write any two advantages of cloud computing.

Cloud computing is a technology that allows users to access and manage computing resources such as servers, storage, and applications over the internet.

Any two advantages cloud computing are:

v Access data and applications from anywhere with an internet connection

v Improved data backup and recovery capabilities

 

e. Define M-Commerce. List the different types of e-commerce?

M-commerce refers to the buying and selling of goods and services through mobile devices like smartphones and tablets.

The different types of e-commerce are:

v Business to Consumer (B2C)

v Business to Business (B2B)

v Consumer to Consumer (C2C)

v Consumer to Business (C2B)

f. What is database? Write any two examples of database.

A collection of systematically organized inter-related data  which store, organize and retrieve data is called a database. Any two examples are:  Dictionary and Telephone Directory.

 

g. What is query? Write down two importance of query.

Query is an object of database that is used to view, retrieve, change and analyze records from a table or multiple linked tables based on specified condition.

Any two importance of query are:

v Queries can be used to create reports and forms that extract meaningful information from data.

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

 

h. What is primary key? Write its importance.

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

The importance of primary key are:

v It sets the relationship between tables.

v It reduces and controls duplication of record in a table.

 

i. Define sorting and filtering.

Sorting

Filtering

The process of arranging all the records in a table either ascending or descending order based on field or fields is known as sorting.

Filtering is the process of viewing required record of a table that matches the specifies criteria.

Sorting can be done in ascending or descending order.

Filtering has various criteria that can be applied.

 

5. Write down the output of the given program and show them in dry run table:

DECLARE SUB SERIES ( )

CLS

CALL SERIES

END

SUB SERIES ( )

X = 1

Y = 1

FOR P = 1 TO 10

PRINT X;

X = X + Y

Y = Y + 1

NEXT P

END SUB

Dry Run Table

X

Y

P = 1 TO 10

PRINT X;

X = X + Y

Y = Y + 1

1

1

1 TO 10 Yes

1

1+1=2

1+1=2

2

2

2 TO 10 Yes

2

2+2=4

2+1=3

4

3

3 TO 10 Yes

4

4+3=7

3+1=4

7

4

4 TO 10 Yes

7

7+4=11

4+1=5

11

5

5 TO 10 Yes

11

11+5=16

5+1=6

16

6

6 TO 10 Yes

16

16+6=22

6+1=7

22

7

7 TO 10 Yes

22

22+7=29

7+1=8

29

8

8 TO 10 Yes

29

29+8=37

8+1=9

37

9

9 TO 10 Yes

37

37+9=46

9+1=10

46

10

10 TO 10 Yes

46

46+10=56

10+1=11

56

11

11 TO 10 No

Loop Exits

 

 

 

The output of the Program is:

1  2  4  7  11  16  22  29  37  46

 

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

REM TO CHECK ODD OR EVEN NUMBERS.

DECLARE FUNCTION TEST$(N)

CLS
INPUT “ENTER ANY NUMBER”; N$

PRINT “THE NUMBER IS “; TEST$

END

 

FUNCTION TEST$(N)

R = R MOD 2

IF R = 0 THEN

A$= “EVEN”

ELSE

A$ = “ODD”

END IF

A$ = TEST$

END FUNCTION

 

Debugged Program

REM TO CHECK ODD OR EVEN NUMBERS.

DECLARE FUNCTION TEST$(N)

CLS

INPUT "ENTER ANY NUMBER"; N

PRINT "THE NUMBER IS "; TEST$(N)

END

 

FUNCTION TEST$(N)

R = N MOD 2

IF R = 0 THEN

    A$ = "EVEN"

ELSE

    A$ = "ODD"

END IF

TEST$ = A$

END FUNCTION

 

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

DECLARE FUNCTION SUM (N)

CLS

INPUT “ENTER MULTIDIGIT NUMBER”; A

SU = SUM(A)

PRINT “SUM OF DIGITS”; SU

END

 

FUNCTION SUM(N)

S = 0

WHILE N < > 0

R = N MOD 10

S = S + R

N = N \ 10

WEND

SUM = S

END FUNCITON

 

a. What is the name of the function used in the above program?

The name of the function used in the above program is Sum ( ).

 

b. List the formal and real parameters used in the above program.

The formal parameter is N and real parameter is A.

 

 

 

 

 

 

 

 

Convert/Calculate as per the instruction:

a. (101101)2 into decimal

 

(101101)₂

= (1 × 2⁵) + (0 × 2⁴) + (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰)

=1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1

=32+0+8+4+0+1

(101101)10  = (45)₁₀

 

b. (BAD)16=(?)8

 

Convert each hex digit to 4 binary digits

BAD

= B A D

B = 1011

A = 1010

C =  1101

101110101101

Convert each 3 binary digits to octal digits

 

5= 101

6 = 110

5 = 101

5 = 101

= 5655

(BAD)16=(5655)8

 

с. (1101) x (101)

 

 

 

 

1

1

0

1

 

 

 

 

x

1

0

1

 

 

 

 

1

1

0

1

 

 

 

0

0

0

0

x

 

 

1

1

0

1

x

x

 

1

0

0

0

0

0

1

(1101) x (101) = (11000001)

 

d. (10100) / (11)

11)

1

0

1

0

0

(110

 

 

1

1

 

 

 

 

 

1

0

0

 

 

 

 

 

1

1

 

 

 

 

 

 

1

0

 

 

 

 

 

 

0

 

 

 

 

 

1

0

 

Q=110

R=10

 

9. Answer the following questions:

a. Write a program in Qbasic to input three different numbers and display smallest

and greatest number. Create a user define function to display smallest and sub

program to display greatest number.

 

 

DECLARE FUNCTION SMALL(A,B,C)

DECLARE SUB GREAT(A,B,C)

CLS

INPUT"ENTER FIRST NUMBER";A

INPUT"ENTER SECOND NUMBER";B

INPUT"ENTER THIRD NUMBER";C

PRINT"THE SMALLEST NUMBER IS: ";SMALL(A,B,C)

CALL GREAT(A,B,C)

END

 

FUNCTION SMALL(A,B,C)

IF A<B AND A<C THEN

SMSLL=A

ELSEIF B<A AND B<C THEN

SMALL=B

ELSE

SMALL=C

END IF

END FUNCTION

 SUB GREAT(A,B,C)

IF A>B AND A>C THEN

PRINT"THE GREATEST NUMBER IS ";A

ELSEIF B>A AND B>C THEN

PRINT"THE GREATEST NUMBER IS ";B

ELSE

PRINT"THE GREATEST NUMBER IS ";C

END IF

END SUB 

 

b. A sequential data file "student.txt" has stored data under the field heading Roll

No ., Name, Gender, marks of English , Nepali and Computer . Write a program to

display all the information of those student whose gender is 'F' and obtained marks

in computer is more than 90 .

OPEN "student.txt" FOR INPUT AS #1

CLS

WHILE NOT EOF (1)

  INPUT #1, RN, SN$, G$, E, N, C

    IF UCASE$(G$) = “F” AND C >90 THEN PRINT RN, SN$, G$, E, N, C

WEND

CLOSE #1

END

 

10. Write a C language that asks a number and check whether it 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;

}

 

Or

Write a C language to display the following series:

1, 3, 5, 7……….up to 10th terms.

 

#include <stdio.h>

int main( )

{

    int i, a=1;

 

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

   {

        printf("%d ", a); 

        a = a + 2;

    }

    return 0;

}

 

 

***ALL THE BEST***