Friday, September 23, 2022

SEE (Grade Promotion) Computer Science - 2078 – 2022

 SEE (Grade Promotion) 2078 – 2022

Opt II Computer Science

Group A

 

1.     Answer the following questions in one sentence:

 

a)     What is search engine?

A search engine is a software program that helps people find the information they are looking for online using keywords or phrases.

 

b)     What is the business done through the internet called?

The business done through the internet is called e-commerce.

 

c)     What is the default size of text field in MS-Access?

The default size of text field in MS-Access is 50 (2003 version) and 255 (2007 version).

 

d)     Which data type is used to store photo in MS-Access?

The data type used to store photo in MS-Access is OLE.

 

e)     What is looping?

 Looping is a sequence of instruction s that is continually repeated until a certain condition is reached.

 

f)      List any two data types used in C-Programming language.

Any two data types used in C-Programming language are int and char.

 

2.     Write appropriate technical term for the following:

 

a)     A program that can disinfect a file from virus.

Antivirus software

 

b)     Learning through the electronic media.

E-learning

 

3.     Write the full form of the following.

 

a)     G2G – Government to Government

 

b)     ISP – Internet Service Provider

 

 

4.     Answer to the following questions:

 

a)     What is network topology? List any two types of network topology.

The arrangement or connection pattern of computers or nodes and other devices of the network is called network topology.

Any two types of network topology are bus topology and ring topology.

 

b)     What is antivirus software? Name any two popular antivirus software.

Antivirus software is software designed to detect and remove virus from computer system.

Any two popular antivirus software are Kaspersky and NOD 32.

 

c)     What is cyber law and cyber crime?

The law which governs the legal issues in the cyber space regarding the internet or WWW for digital data processing and transaction is called cyber law.

Cyber-crime is an illegal action involved in any computer, computer system or overall computer networks like internet.

 

d)     What is virtual reality? Write any two areas where virtual reality are used.

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

Any two areas where virtual reality are used are movies and games.

 

e)     What is password? Write any two importance of password protection.

A password is a secret word or phrase that gives a user access to a particular program or system.

Any two importance of password protection are

·       To protect a system from unauthorized access.

·       provides essential protection from financial fraud and identity theft.

 

f)      What is DBMS? Write any four objects of MS-Access.

DBMS is a software which is used to manage data in an organized way.

Any four objects of MS-Access are table, form, query and report.

 

g)     What are validation text and validation rule?

A field property which allows type text to be displayed if the user input value is prohibited by the validation rule is known as validation text

A field property which enables to limit values that can be accepted into a field is known as validation rule.

 

h)     What is form? Write any two advantages of using form.

Form is an object of database which provides graphical interface to enter data into the tables or multiple linked tables.

Any two advantages of using form are:

·       It provides an interactive platform for input of data into the database.

·       It helps to display data in more presentable form than a datasheet.

 

i)      What is record? Why is primary key necessary in record?

Record is a collection of multiple related fields in a row which gives complete information about a person or thing.

Primary key is necessary in record to reduce and control duplication of record in a table.

 

5.     Write down the output of the given program:

 

DECLARE SUB Series(A)

CLS

A=20

CALL Series(A)

END

SUB Series(A)

FOR K=1 to 5

PRINT A;

A=A+10

NEXT K

END SUB

 

 

 

 

 

 

Dry run

Variable

Variable

Loop

Output

A

K

1 to 5

 

20

1

1 to 5 yes

20  30  40  50  60

30

2

2 to 5 yes

 

40

3

3 to 5 yes

 

50

4

4 to 5 yes

 

60

5

5 to 5 yes

 

70

6

6 to 5 no

Loop exits

 

 

Output

 

20  30  40  50  60

 

 

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

 

REM Program to make a word reverse

DECLARE FUNCTION Rev$(N$)

CLS

INPUT “Enter a word”: N$

DISPLAY “Reversed is”; Rev$(N$)

END

 

FUNCTION Rev$(N$)

FOR K=LEN$(N$) to 1 STEP-1

B$=B$+MID$(N$,1,K)

NEXT K

B$=REV$

END FUNCTION

 

Debugged program

 

REM Program to make a word reverse

DECLARE FUNCTION Rev$(N$)

CLS

INPUT “Enter a word”: N$

PRINT  “Reversed is”; Rev$(N$)

END

 

FUNCTION Rev$(N$)

FOR K=LEN(N$) to 1 STEP-1

B$=B$+MID$(N$,K,1)

NEXT K

REV$ = B$

END FUNCTION

 

 

 

 

 

 

 

 

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

 

DECLARE FUNCTION SUM(N)

CLS

INPUT”Enter any number”: N

X=SUM(N)

PRINT”The sum of individual digit is “; X

END

FUNCTION SUM(N)

WHILE N<>0

R=N MOD 10

S=S+R

N=INT(N/10)

WEND
SUM=S

END FUNCTION

 

a)     Write the function of INT.

The int() function returns the numeric integer equivalent from a given expression.

 

b)     How many times the WHILE…..WEND LOOP repeats if the value of N is 123?

The WHILE…..WEND LOOP repeats 3 times if the value of N is 123

 

8.     Convert/Calculate as per the instruction:

i) (11001101)2 = (?)16                        

ii) (524)10 = (?)2

iii) (1010)2  ´ (110)2 – (1011)2 = (?)2

iv) (10110)2 ÷ (101)2

 

 

9.     Answer the following questions.

 

a)     Write a program in QBASIC that will asks the user to input length, breadth and height of a room then use SUB procedure calculate its volume and FUNCTION procedure to calculate its area of four walls.

 

DECLARE SUB VOL(L,B,H)

DECLARE FUNCTION AREA(L,B,H)

CLS

INPUT “Enter length”; L

INPUT “Enter breadth”; B

INPUT ”Enter height”; H

CALL VOL(L, B, H)

PRINT “Area of four walls=”; AREA(L, B, H)

END

SUB VOL(L, B, H)

V=L*B*H

PRINT “Volume of room”; V

END SUB

 

FUNCTION AREA(L, B, H)

AREA=2*H*(L+B)

END

 

b)     A sequential data file called “Record.dat” has stored data under the field heading Roll No., Name, Gender, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose marks in English is more than 40.

 

OPEN “Record.dat” FOR INPUT AS #1

CLS
WHILE NOT EOF(1)

INPUT #1, R, N$, G$, E, NP, M, C

IF E>40 THEN PRINT R, N$, G$, E, NP, M, C

WEND

CLOSE #1

END

 

10.  Write a program C language that asks any two numbers and displays the greatest among them.

 

#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 greatest number is %d", a);

else

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

return 0;

}

 

 

Or

 

Write a program in ‘C’ language to display the series with their sum 1, 2, 3, 4 ,……up to 10th terms.

 

#include<stdio.h>

#include<conio.h>

int main()

{

int i=1, s=0;

while(i<=10)

{

    printf("%d \n", i);

    s=s+i;

    i++;

}

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

 

return 0;

}

 

No comments:

Post a Comment