Thursday, March 31, 2022

SOLVED NPABSON SEE PRE BOARD EXAM - 2078

 SOLVED NPABSON SEE PRE BOARD EXAM - 2078

Subject: Computer                                        F.M. : 50

1. Answer the following questions in very short: 1×10=10

 

i. What is computer network?

A computer network means two or more computers connected with each other to share data, hardware, software and other resources

 

ii. What is e-mail?

E-mail (Electronic mail) is one of the most popular services provided by the internet which exchanges messages between the computers through a network.

 

iii. What is full form of ISDN?

The full form of ISDN is Integrated Services Digital Network

 

iv. What is the full form of WAN?

The full form of WAN is Wide Area Network

 

v. Write the technical term: The arrangement of connection patterns of computers or nodes and others resources. Network Topology

 

vi. Write the technical term: Commerce done by mobile. M-Commerce

 

vii. What is primary key?

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

 

viii. What is DBMS?

Database management system (DBMS) is a computerized system that stores data process them and provide information in an organized form.

 

ix. What is modular programming?

Modular programming is a technique which divides a program into many small, manageable, logical and functional modules or blocks.

 

x. Write down two data type of C language.

The two data types used in C language are  char and  int

 

 

3. Answer the following questions in short: 2×9=18

 

i. What is transmission medium? Write down with examples.

Transmission medium is a pathway that can transmit information from a sender to a receiver through wired or wireless medium on a network. Examples are: twisted pair cable, co-axial cable, radio wave, microwave etc

 

ii. What is Internet? Write down its services.

Internet is an interconnection of several thousands of computers of different types belonging to the various networks all over the world in order to share data and information. The services of internet are: WWW (World Wide Web), E-mail (Electronic mail), FTP (File Transfer Protocol), IRC (internet Relay Chat) etc.

 

 iii. What is computer security? Give some examples.

The protection of computer systems and information from harm, theft, and unauthorized use is called computer security. Examples are: Password, Biometric, Firewall, Cryptography etc.

 

 iv. What is cyber law? Give some examples.

Cyber law refers to the laws regarding the internet and cyberspace which includes a wide variety of legal issues related to the use of communication technology. Examples of cyber law are Electronic and Digital Signature Law, Cyber Crime Law, Intellectual property Law, Data Protection and Privacy Law etc.

 

v. What is computer virus? Give some examples.

Computer virus is a type of computer program which is written by the programmer with the intent of destroying or damaging the data and programs residing in the computer system. E.g. C-Brain, Frodo, Disk Killer, I Love You etc

 

vi. What is data type? What happens while we enter text in number data type?

Data type is an attribute for a field that determines what type of data it can contain. If we enter text in a numeric field then it displays the errors.

 

vii. What is sort?

Sorting is the process of arranging the record in ascending or descending order according to a given field or fields.

 

viii. What is table? Is table a database?

Table is an object of Ms-Access that stores large volume of data in the form of rows and columns. No, Table is not a database. A table is an object inside a database

 ix. What is report?

Report is an object of Ms-Access which displays the output in an effective way to present the data in a printed format.

 

x. Debug the following program.

DECLARE FUNCTION PAL$ (W$)

CLS

INPUT "Enter a word"; W$

SHOW PAL$ (W$)

END

FUNCTION PAL$ (W$)

FOR I= LEN (W$) TO 1 STEP1

 R$=R$+MID$ (W$, I, 1)

NECT I

IF R$-W$ THEM

P$="Palindrome"

ELSE

P$="Not palindrome"

ENDIF

P$=PAL$

 END FUNCTION

 

Debugged Program

DECLARE FUNCTION PAL$ (W$)

CLS

INPUT "Enter a word"; W$

PRINT PAL$ (W$)

END

 

FUNCTION PAL$ (W$)

FOR I= LEN (W$) TO 1 STEP-1

 R$=R$+MID$ (W$, I, 1)

NEXT I

IF R$=W$ THEM

P$="Palindrome"

ELSE

P$="Not palindrome"

ENDIF

PAL$ =P$

 END FUNCTION

 

xi. What will be output?

DECLARE FUNCTION FACT (N)

CLS

N=5

PRINT FACT (N)

END

FUNCTION FACT (N)

 F=1

FOR I=1 TO N

F=F*I

NEXT I

FACT=F

END FUNCTION

Dry Run

 

Var.

Var.

Var.

 

Output

N

F

I

FOR I=1 to 5Yes

 

5

1

1

 

 

 

1

2

2 to 5 Yes

 

 

2

3

3 to 5 Yes

 

 

6

4

4 to 5 Yes

 

 

24

5

5 to 5 Yes

 

 

120

6

6 to 5 No

LoopExits

120

 

            Output

            120

 

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

DECLARE SUB PC$ (N)

CLS

 INPUT "Enter a number"; N

CALL PC$ (N)

END

SUB PC$ (N)

 FOR I=2 TO N-1

 R=N MOD I

 IF C=0 THEN

PRINT "Prime number"

 ELSE

PRINT "Composite number"

 ENDIF

END SUB

 

a.     What is the name of sub procedure?

The name of the sub procedure is PC$( )

 

b.     List the local variable.

The local variable are N, I, R, C

 

 

 

 

1. Write a program in QBASIC to ask a number and display sum of digits by using FUNCTION..END FUNCTION. [4]

DECLARE FUNCTION SUM (N)

CLS

INPUT "ENTER ANY NUMBER"; N

PRINT "SUM OF DIGITS="; SUM(N)

END

 

FUNCTION SUM (N)

S = 0

WHILE N < > 0

R = N MOD 10

S = S + R

N = N \ 10

WEND

SUM = S

END FUNCTION

 

2. Write a program in QBASIC to create a file "EMP.DAT" and store employees Name, Address, Salary and Telephone number on the basis of user choice. [4]

OPEN “EMP.DAT” FOR OUPUT AS #1

DO

CLS

INPUT “ENTER NAME”; N$

INPUT “ENTER ADDRESS”; A$

INPUT “ENTER SALARY”; S

INPUT “ENTER TELEPHONE NUMBER”; T

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

INPUT “DO YOU WANT TO CONTINUE”; CH$

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

CLOSE #1

END

 

3. Write a program in C language to ask length, breadth and height and display volume of box. [4]

#include<stdio.h>

#include<conio.h>

int main()

{

int l,b,h,v;

printf("Enter length: ");

scanf("%d", &l);

printf("Enter breadth: ");

scanf("%d", &b);

printf("Enter height: ");

scanf("%d", &h);

v=l*b*h;

printf("Volume of box= %d", v);

return 0;

}

 

 

 

2. Solve the problem as indicated: 1×4=4

i. (209)10 into Octal number         

ii. (A0F)16 into Binary number.

 

i. (1011011)2 × (110)2                   

ii. (1110001)2 ÷ (101)2

 

Monday, March 21, 2022

PABSON SEE PRE BOARD EXAM - 2078 [MORANG]

 PABSON

SEE PRE BOARD EXAM - 2078

SUBJECT: COMPUTER SCIENCE

1. Answer the following question in one sentence.

a)      What is an email?

Ans: E-mail is a method of exchanging messages between people using electronic devices.

b)      What is cyber law?

Ans: Cyber law is the part of the overall legal system that deals with the internet, cyber space and their respective legal issues.

c)      What is the field size of yes/no field?

Ans: the field size of YES/NO field is 1 bit.

d)      Write any two objects of ms access.

Ans: any two objects of ms access are i) tables      ii) queries.

e)      What is module?

Ans:  module is a block of statement that solves particular problem.

f)       Write any two data types of C language.

Ans: any two data types of C language are int and char.

2. write appropriate technical term for the following.

a) business through internet.    E- Commerce

b) A types of network in which each computer can act as a server as well as client.   Peer to peer netwrok

c) a collective online communications channels dedicated to community based input, interaction, content sharing and collaboration. Social media

d) the smallest unit to represent information on quantum computer. Qubit (quantum bit)

 

3. write the full form of the following.

B2B = Business to Business

FTP = File Transfer Protocol

ICT = Information and Communication Technology

LAN = Local Area Network

 

Group - B

4. Answer the following questions.

a) Write any two advantages and disadvantages of computer network.

Ans: any two advantages of computer network are:

       i.          Convenient resource sharing

      ii.          Great storage capacity and reduced cost.

Any two disadvantages of computer network are:

       i.          Lack of robustness

      ii.          Spread of computer virus

b) What is digital footprint? Write any two tips to maintain digital reputation.

Ans:  a digital footprint is a trail of data you create while using the internet.

Any two tips to maintain digital reputation are:

       i.          Be transparent

      ii.          Respond to every review

c) What is password policy? Write any two important criteria for creating strong password.

Ans: A password policy defines the password strength rules that are used to determine whether a new password is valid.

Any two important criteria for creating strong password are:

       i.          Do not keep a password which can be easily guessed such as date of birth, nickname etc.

      ii.          Keep changing you password regularly.

d) What is e-commerce? Write any two disadvantages of e-commerce.

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

Any two disadvantages of e-commerce are:

       i.          No guarantee of product quality.

      ii.          Technical failure may affect the business system.

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

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

Any two advantages of IoT are:

       I.          Accessing information is easy; youcan control a devices that is mile apart in real time.

     II.          Communication between the connected devices becomes more transparent and easier.

f) What is DBMS? Write any two examples.

Ans: DBMS is a software which helps to extract , view and manipulate data in an organized way.

Any two examples of DBMS are: i) Oracle               ii) MS - Access

g) What is MS Access? Write any two advantages of it.

Ans: MS Access is a relational database management system which is used to store and manipulate large volumes of data in the form of table.

Any two advantages of MS Access are:

       i.          Easy to integrate

      ii.          Easy to share data

h)What is query? Write its type.

Ans: A query is an access objects used to view, analyze, or modify data.

Types of queries are: i) Select queries        ii) Action queries

i)What is data type? Write some data types of ms access.

Ans: Data types are the building blocks of databases.  Some data types of ms access are: i) Number                ii) date/time        iii) currency         iv) autonumber

 

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

DECLARE SUB SERI ( )

CLS

CALL SERI

END

SUB SERI

               A$ = "SCIENCE"

               B = LEN (A$)

               FOR I = 1 TO 4

                              PRINT TAB(I); MID$(A$, I, B)

                              B =B-2

               NEXT I

END SUB

DRY RUN TABLE:

VARIABLE

VARIABLE

VARIABLE

OUTPUT

A$

B

I

 

SCIENCE

7

1

SCIENCE

 

5

2

   CIENC

 

3

3

     IEN

 

1

4

       E

 

-1

5  

LOOP EXITS

 

OUTPUT:

SCIENCE

   CIENC

     IEN

      E

6. Rewrite the given program after correcting the bugs.

Rem to convert the given number in reverse order

DECLARE FUNCTION REV (A)

CLS

INPUT "ENTER A NUMBER"; A

CALL REV (A)

PRINT "REVERSE ="; RE

END

FUNCTION REV$ (A)

               WHILE A<> 0

                              R= A MOD2

                              S = S * 10 + R

                              A = A - 10

               WEND

               REV = S

END SUB

CORRECT PROGRAM

DECLARE FUNCTION REV (A)

CLS

INPUT "ENTER A NUMBER"; A

RE=REV(A)

PRINT "REVERSE ="; RE

END

FUNCTION REV (A)

               WHILE A<> 0

                              R= A MOD 10

                              S = S * 10 + R

                              A = A \ 10

               WEND

               REV = S

END FUNCTION

 

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

CLS

OPEN "INFO.DAT" FOR INPUT AS #5

TOP:

INPUT "ENTER NAME"; N$

INPUT "ENTER ADDRESS";A$

INPUT "ENTER PHONE NUMBER";P

WRITE #5, N$, A$, P

INPUT "DO YOU WANT TO CONTINUE (Y/N)?"; AN$

IF UCASE$ (AN$) = "Y" THEN GOTO TOP

CLOSE #5

END

Questions:

a)      List the variables used in above program.

Ans: variables used in above programs are: A$, P, N$, AN$.

b)      What is the name of data file used in above program?

Ans: INFO.DAT is the name of data file used in above program.

Group - C

8. Convert / calculate as per the instruction:

a) (110111)2 into (decimal)

               = 1 * 25 + 1 * 24 + 0 * 23 + 1 * 22 + 1 * 21 + 1 * 20

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

               = 55

b)(25AF)16 into (Binary)

                              Hexadecimal value       2 5             A             F

                              Binary value                  0010           0101      1010      1111

        (25AF)16 = (10010110101111)2

c)11110 + 10011 = 110001

d) 1110 ÷ 110 = 10 Remainder: 10

 

9. Write a program in QBASIC that ask the radius of circle. Write a program to calculate the area and circumference of a circle. Create a user defined function first (r) to calculate area and sub procedure second (r) to calculate circumference of a circle.

Ans:

DECLARE FUNCTION FIRST (R)

DECLARE SUB SECOND (R)

CLS

INPUT "ENTER RADIUS"; R

PRINT " AREA OF A CIRCLE="; FIRST (R)

CALL SECOND (R)

END

 

FUNCTION FIRST (R)

FIRST = 3.14 * R ^ 2

END FUNCTION

 

SUB SECOND (R)

C = 2 * 3.14 * R

PRINT " CIRCUMFERENCE OF CIRCLE =" ; C

END SUB

 

10. Write a program to update the rate by increasing 10% from a sequential data file "Data.dat" that store item name, rate and quantity.

 

OPEN "DATA.DAT" FOR INPUT AS#1

OPEN "TEMP.DAT" FOR OUTPUT AS #2

CLS

PRINT "DATA UPDATED BY INCREASING 10%"

PRINT "ITEM NAME", "RATE", "QUANTITY"

WHILE NOT EOF (1)

               INPUT #1, N$, R, Q

               R1 = R + 10/100 * R

               WRITE #2, N$, R1, Q

WEND

CLOSE #1, #2

KILL "DATA.DAT"

NAME "TEMP.DAT" AS "DATA.DAT"

END

 

10. Write a program in c language to calculate simple interest.

 

 #include <stdio.h>

#include <conio.h>

int main()

{

    float p, t, r, i;

    printf("Enter the principal amount : ");

    scanf("%f", &p);

    printf("Enter the number of years : ");

    scanf("%f", &t);

    printf("Enter the rate of interest : ");

    scanf("%f", &r);

    i = (p * t * r) / 100;

    printf("Simple Interest = %f", i);

    return 0;

}

 

or

Write a C program to find the sum of first 10 natural numbers.

#include <stdio.h>

int main()

 {

    int i, sum = 0;

    i = 1;

    while (i <= 10) {

        sum += i;

        ++i;

    }

 

    printf("Sum = %d", sum);

    return 0;

}


Solved  BY: Saugat Basnet