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

Friday, March 18, 2022

Solved PABSON SEE PRE-BOARD EXAM -2078

 Solved PABSON SEE PRE-BOARD EXAM -2078

PABSON

SEE PRE-BOARD EXAM -2078

Subject: Opt II Computer Science                                                          Full Marks: 50

Time : 1.5 hrs

Attempt all the questions.

Group ’A’ 10 x 1 = 10

Very short questions.

 

1) Give answer in one sentence for the following question. 6 x1 =6

a)      Define bandwidth.

Bandwidth can be defined as the maximum volume of data that can be transmitted through a communication system.

b)      What is cyber bulling?

Cyber bullying is a kind of harassment using mobiles or computers.

c)      What is AI?

Artificial intelligence (AI) is an area of computer science that emphasizes the creation of intelligent machines that work and reacts like humans.

d)      What is the storage size of memo and text data type in MS- Access?

Text can store up to 255 characters and Memo can store up to 65,535 characters

e)      What is local variable?

Variables which are declared inside a module and which cannot be accessed by other module are called local variables.

f)       What is an operator in C language?

Operator is a symbol that is used to perform mathematical operations.

 

2) Write appropriate technical terms for the following. 2 x1=2

a)      Secret group of characters which helps to protect file from unauthorized person. Password

b)      A type of network in which every computer works as both client and server. Peer to Peer Network

 

3) Write the full forms of the following. 2x1=2

               i) ADSL – Asymmetric Digital Subscriber Line                         

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

 

 

 

Group ’B’ 12 x 2 = 24

4) Answer the following questions. 9 x2 =18

a)      Differentiate between LAN and WAN.

LAN

WAN

A LAN is a type of network which covers small area i.e. within a room, building, or short distance by using cables or small wireless devices.

A WAN is a type of network which connects two or more computers generally across a wide geographical area such as cities, districts, and countries.

E.g.: network in a school, college or cyber cafe. The diameter is not more than a few kilometers.

E.g. internet.

 

b)      Write any four commandments of computer ethics.

Any four commandments of computer ethics are:

·        You should not use a computer to harm other people.

·        You should not search the file or record of other people.

·        You should not spread false and illegal information.

·        You should not destroy, erase or edit personal or group records.

 

c)      What is E- commerce? List any two E- commerce companies in Nepal.

Ecommerce, also known as electronic commerce or internet commerce, refers to the buying and selling of goods or services using the internet.

Any two E- commerce companies in Nepal are sastodeal and daraz.

 

d)      What are the advantages of cloud computing?

The advantages of cloud computing are:

·        Cloud allows us to quickly and easily access, store information anywhere, anytime in the whole world, using an internet connection.

·        Cloud computing reduces both hardware and software maintenance costs for organizations.

 

e)      What is VR? Mention its application areas.

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 is called Virtual Reality.

Its application areas are:

  • It can be used in medical studies to enable students to know the human body structure.
  • It can be used in driving schools as it give a real look of roads and traffic.

 

f)       What is DBMS? Give any two examples.

Database management system (DBMS) is a computerized system that stores data process them and provide information in an organized form.
Any two examples are MS-Access and Oracle.

 

g)      What is primary key? List any two advantages.

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

Any two advantages of primary key are:

·        To reduce and control duplication of record in a table.

·        To set the relationship between tables.

 

h)      What is query?

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

 

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

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

Any two advantages of sorting are:

·        It helps to find specific information quickly.

·        It helps to arrange data in alphabetical order.

5) Write down the output of the given programs. [2]

               DECLARE SUB DISPLAY (A)

               CLS

               A= 3

               CALL DISPLAY (A)

END

SUB DISPLAY (A)

FOR X = 1 TO 6

PRINT A;

IF A MOD 2 = 0 THEN

A=A/2

ELSE

A= (A*3)+1

END IF

NEXT X

END SUB

 

Dry Run

A

X=1 TO 6

PRINT A;

IS A MOD 2=0 ?

Yes (A=A/2)

No(A=A*3+1)

 

3

1 To 6 Yes

 3

3 MOD 2=0

1=0 NO

 

3*3+1=10

10

2 To 6 Yes

 10

10 MOD 2=0

0=0 YES

10/2=5

 

5

3 To 6 Yes

 5

5 MOD 2=0

1=0 NO

 

5*3+1=16

16

4 To 6 Yes

 16

16 MOD 2=0

0=0 YES

16/2=8

 

8

5 To 6

 8

8 MOD 2=0

0=0 YES

8/2=4

 

4

6 To 6

4 MOD 2=0

0=0 YES

4/2=2

 

2

7 To 7 No

Loop terminates

 

 

 

 

The output of the program is:

3  10  5  16  8  4  

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

               REM to add more data in a sequential file.

               OPEN “EMP.DAT” FOR INPUT AS #2

               DO

               INPUT “ENTER NAME”; N$

               INPUT “ENTER ADDRESS”; A$

               INPUT “ENTER SALARY”; S$

               WRITE #1, N$, A$, S

INPUT” Do you want to add more records.”; M$

LOOP WHILE UCASE(M$) = “Y”

 

END

Debugged Program

REM to add more data in a sequential file.

               OPEN “EMP.DAT” FOR APPEND AS #2

               DO

               INPUT “ENTER NAME”; N$

               INPUT “ENTER ADDRESS”; A$

               INPUT “ENTER SALARY”; S

               WRITE #2, N$, A$, S

INPUT” Do you want to add more records.”; M$

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

CLOSE #2

END

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

               DECLARE FUNCTION test$ (A$)

               CLS

               INPUT “ENTER ANY WORD”; T$

               PRINT test$(t$)

               END

               FUNCTION test$ (A$)

               FOR M = LEN(A$) TO 1 STEP -1

               C$= C$+ MID$(A$, M,1)

               NEXT M

               Test$ = C$

               END FUNCTION

a)      List the formal and actual parameters used in the program given above.

Formal parameter= A$

Actual parameter = t$

b)      List the library function used in the above program.

The library function used in the above program is LEN( ) and MID$( ).

 

 

Group ‘C’ [4 x4= 16]

8) Convert/Calculate as per the instruction: 4 x1 =4

a)      (CCA)16into binary

b)      (654)10 into octal

c)      (111011 / 100)2

d)      (10101 - 1110)2 x (10) 2

9) Write a program in QBASIC that allows user to enter radius of a circle. Create a user define function to find the area of circle and sub procedure to find volume of a cylinder. Hint: [A= r2        v= r2h]

DECLARE FUNCTION AREA (R)

DECLARE SUB VOL(R, H)

CLS
INPUT “Enter Radius”; R

INPUT “Height”; H

PRINT “Area of Circle=”; AREA(R)

CALL VOL(R, H)

END

 

FUNCTION AREA(R)

AREA = 3.14 * R ^ 2

END FUNCTION

 

SUB VOL (R, H)

V = 3.14 * R ^ 2 * H

PRINT “Volume of Cylinder=”; V

END SUB

 

10) A sequential data file “emp.dat” contains employee’s name, address, gender and salary. WAP to display all the information of employees whose salary is more than Rs. 20,000

OPEN “emp.dat” FOR INPUT AS #1

CLS

WHILE NOT EOF(1)

INPUT #1, N$, A$, G$, S

IF S>20000 then PRINT N$, A$, G$, S

WEND

CLOSE #1

END

 

 

11) Write a program in C language to input any two numbers and find greater number.

#include<stdio.h>

#include<conio.h>

int main()

{

int a,b;

printf("Enter any two numbers:\n ");

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

if(a > b)

printf("The greater number is %d", a);

else

printf("The greater number is %d", b);

return 0;

}

 

 

OR

Write a program in C language that asks user to enter any number and check whether the number 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;

}

 

 

 

The End