Tuesday, December 26, 2023

Solved Bhaktapur SEE MODEL SET-1 2080 Subject: Opt. II Computer Science

 




Bhaktapur SEE MODEL SET-1

 

Subject: Opt. II Computer Science 

Time: 1:30 hrs.                                                                              Full Marks: 50

 

 

Candidates are required to give answers according to the instructions given.

Group ‘A’

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

 

a)     Define bandwidth.

Ans: The amount of data that can be carried from one point to another in a given time period is called bandwidth.

 

b)    What is cyber-crime?

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

 

c)     Define AI.

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

 

d)    What is the storage size of text and currency data type?

Ans: The storage size of text data type is 255 and currency data type is 8 bytes.

 

e)     Define modular programming.

Ans: Modular programming is a technique used to divide program into many small, manageable, logical and functional modules or blocks.

 

f)      Write any two features of C language.

Any two 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 terms for the following:          [2x1=2]

a)     Physical layout of computers in a network. Network Topology

b)     A secret group of characters used to protect information systems from unauthorized users. Password

 

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

a. STP   - Shielded Twisted Pair

b. NIC – Network Interface Card

 

Group ‘B’

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

a)     Differentiate between client server architecture and peer to peer architecture.

Ans: The difference between client server architecture and peer to peer architecture are:

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.

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

It provides central security administration and the network administrator is responsible for data security and other resources management of 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)    Write any four commandments of computer ethics.

Ans; 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)     Define hardware security. Give any two measures of software security.

Ans: Hardware security is the protection given to the various hardware tools and equipment used in computer system from the accidental or intentional harm.

Any two measures of software security are:

Password and Backup

 

d)    What is VR? Mention its application areas.

Ans: Virtual reality is an artificial environment created with computer hardware and software and presented to the user in such a way that it appears and feels like a real environment.

Any two areas where it is used are:

Gaming-  VR Gaming allows players to immerse (dip) themselves in virtual world and interact with

environment and characters

Education - VR can help students learn by making the content more engaging and memorable.

 

e)     What is mobile computing? Write any four importance of it.

Ans: Mobile computing refers to the use of portable computing devices, such as smartphones, tablets, laptops, and wearables, that allow users to access and transmit data, information, and applications without being tied to a fixed physical location.

Any four importance of it are:

It allows people to work and communicate from anywhere at any time.  

It keeps connected to the Internet, allowing to access information all the times.  

It increases the productivity of users reducing time and cost.  

It is one of the major handheld sources of entertainment for users at present.

 

f)      Define DBMS with examples.

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

Examples of DBMS software are : MS-Access, Oracle, Fox pro, dBase etc.

 

g)     Define data redundancy. How can it be reduced?

Ans: Data redundancy refers to the repetition or duplication of data within a database.

It can be reduced by normalizing the database, eliminating duplicate data and storing it in separate tables, and using foreign keys to establish relationships between the tables.

 

h)    What is data sorting? Write its two advantages.

Ans: Sorting refers to the process of organizing data in a specific order (ascending or descending) based on one or more fields in a table, query, or report.

Any two advantages of using it are:

Sorting helps to organize data and make it easier to find and retrieve specific information.

Sorting can save time and improve efficiency by allowing users to quickly access the data they need.

 

i)      Mention any four data types used in MS-Access.

Any four data types used in MS-Access are text, memo, Yes/No and Currency.

 

5. Write down the output of the given program.                                  [2]

            DECLARE FUNCTION TEXT$(A$)

CLS

            A$= “TECHNOLOGY”

            Y$= TEXT$(A$)

             PRINT Y$

            END

             

            FUNCTION TEXT$(A$)

            B= LEN(A$)

            FOR I = 1 TO B

              IF I MOD 2 = 1 THEN

              B$= B$+MID$(A$,I,1)

              END IF

            NEXT I

              TEXT$= B$

             END FUNCTION

 

Dry Run

A$

B

I=1 to B

IF I MOD 2 =1

B$=B$+MID$(A$,I,1)

Y$

PRINT Y$

TECHNOLOGY

10

1 to 10

1 MOD 2=1

1=1 yes

T

TCNLG

TCNLG

 

 

2 to 10

2 MOD 2=1

0=1 no

 

 

 

 

 

3 to 10

3 MOD 2=1

1=1 yes

T+C = TC

 

 

 

 

4 to 10

4 MOD 2=1

0=1 no

 

 

 

 

 

5 to 10

5 MOD 2=1

1=1 yes

TC+N=TCN

 

 

 

 

6 to 10

6 MOD 2=1

0=1 no

 

 

 

 

 

7 to 10

7 MOD 2=1

1=1 yes

TCN+L=TCNL

 

 

 

 

8 to 10

8 MOD 2=1

0=1 no

 

 

 

 

 

9 to 10

9 MOD 2=1

1=1 yes

TCNL+G

 

 

 

 

10 to 10

10 MOD 2=1

0=1 no

TCNLG

 

 

 

 

11 to 10

Loop Exit

 

 

 

 

 

The output of the program is

TCNLG

 

6.  Rewrite the following program after correcting the bugs.                  [2]

            DECLARE FUNCTION SUM(N)

CLS

            INPUT “ENTER A NUMBER”; N

            SU= SUM(N)

            PRINT “SUM =”; SUM(N)

             END

           

            FUNCTION SUM(N)

               WHILE N< > 0

                R = R MOD 10

                S= S + R

                 N = N \  10

              WEND

            S= SUM

            END SUB

Debugged Program

 

DECLARE FUNCTION SUM(N)

CLS

            INPUT “ENTER A NUMBER”; N

            SU= SUM(N)

            PRINT “SUM =”; SU

             END

           

            FUNCTION SUM(N)

               WHILE N< > 0

                R = N MOD 10

                S= S + R

                 N = N \  10

              WEND

            SUM=S

            END FUNCTION

 

 

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

            DECLARE SUB TEST(A$)

CLS

            A$= “COMPUTER”

            END

                       

SUB TEST (A$)

L= LEN(A$)

            FOR I =  L TO 1  STEP -2

              PRINT MID$(A$, I, 1)

              NEXT I

             END SUB

 

a)     What statement should be added in the main module to execute the program?

Ans: CALL TEST(A$) statement should be added in the main module to execute the program.

 

b)     List out the variables used in the above program with types.

Ans: the variables used in the above program are:

A$ - String Variable

L, I – Numeric Variable

 

Group ‘C’

8. Convert/ calculate as per the instruction.                                       [4]

 

a)     (670)8 = (?)10

b)     (FACE)16 = (?)2

c)     1100 x 110

d)     111011 ÷ 100

 

9. a) Write a program in QBASIC that asks for the length, breadth and height of a box. Create a user defined function to find the volume of the box and  sub procedure to find the total surface area of the box. [Hint: Vol=l x b x h ; Area=2(lb+bh+lh)                                                               [4]

 

    DECLARE SUB TSAREA (L, B, H)

DECLARE FUNCTION VOLUME (L, B, H)

CLS

INPUT “ENTER LENGTH”; L

INPUT “ENTER BREADTH”; B

INPUT “ENTER HEIGHT”; H

CALL TSAREA(L, B, H)

PRINT “VOLUME OF CUBOID ”; VOLUME(L, B, H)

END

 

SUB TSAREA (L, B, H)

T = 2 * (L * B + B * H + H * L)

PRINT “TOTAL SURFACE AREA OF CUBOID ”; T

END SUB

 

FUNCTION VOLUME (L, B, H)

VOLUME = L * B * H

END FUNCTION

 

 

 

b. Write a program to open a data file “Record.dat” which contains student’s name, class and address and print only those students’ records whose name  starts from an alphabet “A”.                         [4]

 

 

OPEN "Record.dat" FOR INPUT AS #1

CLS

WHILE NOT EOF (1)

  INPUT #1, N$, C, A$

A$ = UCASE$(LEFT$(N$,1))   

IF A$ = “A” THEN PRINT N$, C, A$

WEND

CLOSE #1

END

 

 

10.  Write a program in C language to enter a number and check if it 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 display the series:

         2, 4, 6, 8, 10, 12……………10th term.

 

#include <stdio.h>

 

int main()

{

    int a=2,i;

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

{

    printf("%d ", a);

    a=a+2;

}

    return 0;

}

Monday, December 25, 2023

SOLVED ROSEBUD SCHOOL Buddhanagar, Kathmandu PRE-SEND UP EXAMINATION-2080 Subject: Computer Science

 






ROSEBUD SCHOOL

Buddhanagar, Kathmandu

PRE-SEND UP EXAMINATION-2080

Subject: Computer Science

Time: 02:00 hrs

Full Marks: 50

Class: X (Ten)                                                                                                                       Pass Marks: 20

 

Group "A" [10]

 

1. Give answer in one sentence for the following questions: [6×1=6]

 

a. Define bandwidth.

Ans: The amount of data that can be carried from one point to another in a given time period is called bandwidth.

 

b. What is digital footprint?

Ans: Digital footprint is a trace of data that is created while using the Internet

 

c. Which data type of MS Access is used for data that can store only one of two possible values?

Ans: The data type that can store only one of two possible values is Yes/No.

 

d. List the importance of primary key.

Ans: The importance of primary key are

i) To reduce and control duplication of record in a table.
ii) To set the relationship between tables.

 

e. What are parameters?

Ans: Parameters are variables that will receive data (arguments value) sent to the procedures (SUB program and FUNCTION). Formal parameters are called parameter.

 

f. What are data types used in c programming?

Ans: The data types used in c programming are int, char, float and double.

 

2. Write appropriate technical terms for the following:  [2×1=2]

 

a. The method by which information is converted into secret code that hides the information's true meaning. Encryption

 

b. Hacking done with permission from the client. Ethical Hacking

 

3. Write the full forms of the following: [2×1=2]

 

a. ASCII - American Standard Code for Information Interchange

b. BIOS - Basic Input Output System

 

 

 

Group "B" [24]

 

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

 

a. What is search engine? Name any two popular search engines.

Ans: A search engine is a powerful tool that helps to find information on the internet using keywords or phrases.

Any two popular search engines are Google and Bing

 

b. Define social media. Give example of it.

 

Ans: Social Media is an online tool that helps to create, share, and exchange content, ideas, and information with the whole world. Examples of social media are facebook, instragram, twitter and youtube.

 

c. What is key logger?

Ans: A keylogger is a type of spyware that can be used to record or track the keystrokes made by a user on a keyboard.

 

d. Write any four preventive measures for computer hardware security.

Ans: Any four preventive measures for computer hardware security are:

a)     Regular Maintenance

b)     Insurance

c)     Air condition system

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

 

e. What is m-commerce? Write its two important services.

Ans: M-Commerce refers to the process of buying and selling of goods and services through wireless handheld devices such as smartphones, tablets or personal digital assistants (PDAs).

Any two important services of m-commerce are:

Mobile Shopping: M-commerce enables users to browse, select, and purchase products or services directly from their mobile devices like daraz, hamrobazar, amazon etc.

Mobile Payments: This service involves making payments using mobile device like e-sewa, khalti

 

 

f. What is cyber crime? Give any two examples.

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

 

g. What is database management system? Give any two examples.

Ans: DBMS is a software that manages databases, allowing users to store, access, and manipulate data in an organized and secure way. Any two examples are MS-Access and Oracle,

 

h. What is form? Write its uses.

Ans: Form is a database object that provides a graphical interface for users to view, enter, and edit data from one or more tables, queries, or other data sources.

The uses of forms are:

Forms provide an easy-to-use interface for data entry and manipulation, improving data accuracy and completeness.

Forms enable users to customize the look and feel of data input screens

 

i. What is data sorting? Write any two importance of it.

Ans: Sorting refers to the process of organizing data in a specific order (ascending or descending) based on one or more fields in a table, query, or report.

Any two importance of sorting are:

Sorting helps to organize data and make it easier to find and retrieve specific information.

Sorting can save time and improve efficiency by allowing users to quickly access the data they need

 

 

5. Write the output of the given program. Show with dry run in table. [2]

 

            DECLARE SUB SERIES ( )

            CALL SERIES

            END

           

            SUB SERIES

            A = 1

            FOR I = 1 TO 5

                        PRINT I * A

            A = A+ (10 ^ I)

NEXT I

END SUB

 

Dry Run

A

I=1 to 5

PRINT I * A

A= A+ (10 ^ I)

1

1

1*1 =1

1+(10^1)=11

11

2

2*11=22

11+(10^2)=111

111

3

3*111=333

111+(10^3)=1111

1111

4

4*1111=4444

1111+(10^4)=11111

11111

5

5*11111=55555

11111+(10^5)=111111

111111

6 [Loop Exits]

 

 

 

The output of the program is

1

22

333

4444

55555

 

5. Re-write the given program after correcting the bugs.

 

REM Program to generate 2, 2, 4, 6, 10 up to 10th term

DECLARE SUB FIBO ( )

CLS
EXECUTE FIBO

END

 

SUB FIBO

A = 2

B = 2

FOR ctr = 5 to 1

DISPLAY A; B;

A = A + B

B = A + B

NEXT ctr

END FUNCTION

 

Debugged Program

 

REM Program to generate 2, 2, 4, 6, 10 up to 10th term

DECLARE SUB FIBO ( )

CLS
CALL  FIBO

END

 

SUB FIBO

A = 2

B = 2

FOR ctr = 5 to 1 STEP -1

PRINT A; B;

A = A + B

B = A + B

NEXT ctr

END SUB

 

7. Study the following program and answer the given questions. [2×1=2]

 

DECLARE SUB TEST (A, B)

CLS

X= 7

Y = 5

CALL TEST (X, Y)

END

 

SUB TEST (A, B)

FOR I = A to B STEP -1

A = A+ B

B = B + A

NEXT I

END SUB

 

 

a. List the formal parameter and argument.

Ans: Formal parameters are  A and B

            Arguments are X and Y

 

b. Which loop is used in the above program?

Ans: FOR……NEXT loop is used in the above program.

 

Group "C" [44-16]

 

8. Convert/calculate as per the instructions:

a. (BCD)16 into Binary

 

b. (546)8 into decimal

 

c. (101101-11001×101)

 

d. (10110¸101)

 

 

a. Write a program in QBASIC that allows user to enter a number and check whether the given number is prime or composite using sub procedure and check given number is even or odd using function procedure [4]

 

DECLARE SUB PRIME (N)

DECLARE FUNCTION CHECKPO$ (N)

CLS
INPUT “Enter any number”; N

CALL PRIME (N)

PRINT “The given number is”; CHECKPO$(N)

END

 

SUB PRIME (N)

C = 0

FOR I = 1 TO N

IF N MOD I = 0 THEN C = C + 1

NEXT I

IF C = 2 THEN

PRINT "PRIME NUMBER"

ELSE

PRINT "COMPOSITE NUMBER"

END IF

END SUB

 

FUNCTION CHECKPO$ (N)

IF N MOD 2 = 0 THEN

CHECKPO$ = “EVEN NUMBER”

ELSE

CHECKPO$ = “ODD NUMBER”

END IF

END FUNCTION

 

 

Write QBASIC program to delete some records from "rec.txt file where computer ask user to enter the name to be deleted. Fields are name, address and age. [4]

 

OPEN “rec.txt” FOR INPUT AS #1

OPEN “temp.dat” FOR OUTPUT AS #1

CLS

INPUT “Enter name which is to be deleted”; D$

WHILE NOT EOF(1)

INPUT #1, N$, A$, AG

IF UCASE$(D$)<>UCASE$(N$) THEN

WRITE #2, N$, A$, AG

ELSE

PRINT “Deleted data=”; N$, A$, AG

END IF

WEND

CLOSE #1, #2

 KILL “rec.txt”

NAME “temp.dat” AS “rec.txt”

END

 

Write C program to input a multi-digit number and calculate the sum of its individual digits.

 

 

#include <stdio.h>

int main() {

  int n, s = 0, r;

  printf("Enter a number: ");

  scanf("%d", &n);

  while (n != 0)

{

    r= n % 10;

    s=s+r;

    n =n / 10;

  }

  printf("The sum of the digits is: %d\n", s);

  return 0;

}

 

OR

 

 

Write C program that input a number and check whether it is even or odd. (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;

}

 

 

The End