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

 

 

 

 

              

 

 

 

 

 

 

 

Monday, February 28, 2022

DBMS Short Questions and Answers [SEE Computer Science]

 1.     Which data type is used to store numeric characters or special symbols in MS-Access? -Text

2.     Which view is used to modify a table in MS-Access? - Design view.

3.     Which data type is used to store logical data in table? - Yes/No

4.     Write any two methods of creating table in MS Access. -Design View and Using Wizard

5.     What is the caption in the table structure of MS-Access? 

-Caption is a field property which displays an alternate name for the field to make the field name more explanatory. It can contain up to 2048 characters.

6.     Which data type is suitable to store photographs of students in MS-Access? - OLE Object

7.     List the four objects of the MS-Access database. – Table, Query, Form and Report

8.     Mention the name of two views of the table in MS-Access. – Design view and Datasheet View

9.     Define validation rule.

-Validation rule is a field property which enables to limit values that can be accepted into a field.

10.  What is the default field size of short text data type in MS-Access? -255 characters

11.  What is the maximum character you can use for creating a field name in MS-Access? -64 characters

12.  What is the extension of the MS-Access database file? - .mdb

13.  Define validation text. 

-Validation text is a field property which allows type text to be displayed if the user input value is prohibited by the validation rule.

14.  Which type of query is used to calculate the total marks of students in MS-Access? – Select Query

15.  In which case the Memo field type is suitable in MS-Access? 

-         If you required to keep more than 255 characters

16.  What is the memory space used by the auto-number data type in MS-Access? – 4 bytes

17.  What are the uses of reports in MS-Access? 

-to print documents according to user specifications of the summarize information through queries or tables.

18.  Which data type is suitable to store the salary of employees in MS-Access? - Currency

19.  Differentiate data and information. 

Data can be numbers, letters or symbols representing facts and figures which may or may not give any sense. E.g.: Ram, student, 20, etc.

Information is an organized collection of related data, which gives a complete sense.

“Ram is a student. He is 20 years old.”, is information that gives a complete sense.

 

20.  What is the memory space used by the Currency data type in MS-Access? – 8 bytes

21.  Mention any four data types available in MS-Access. – Text, Memo, Currency, Date/Time

22.  Define field properties. 

-Field properties describe the characteristics and behavior of data added to that field