Friday, April 29, 2022

Solved Computer Science SEE 2078

 

SEE 2078

Solved Computer Science

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

a) Write the name of any two search engines.

Ans: The name of any two search engines is google.com and ask.com

b) What is social media?

Ans: Social media is computer-based technology that facilitates the sharing of ideas, thoughts, and information through the building of virtual networks and communities.

c) Which data type is suitable to store photographs of students in MS-Access?

Ans: The suitable data type to store photographs of students in MS-Access is OLE object.

d) Which view is used to modify a table structure in MS-Access?

Ans: Design View is used to modify a table structure in MS-Access.

e) Which statement is used to call sub-procedure?

Ans: CALL statement is used to call sub-procedure.

f) Write any two data types used in C language.

Ans: Any two data types used in C language are int and char.

2. Write appropriate technical term for the following. 2x1=2

a) A system of copying data and information reading in computer into another location. Backup

b) A company which provides services of Internet. Internet Service Provider (ISP)

3. Write the full form of the following.    2x1=2

a) FTP: File Transfer Protocol

b) MAN: Metropolitan Area Network

4. Answer the following questions.          9x2=18

a) What is computer network? Write any two advantages of it.

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

Any two advantages of computer network are:

·       Computer in a network can access the network-connected hardware devices like printers, disk drives, etc.

·       Computers in a network system share different software packages.

b) Define software security. Write any two protection measures for it.

Ans: The security given to the software and data from being lost or damaged due to accidental or intentional harm is called software security.

Any two protection measures for software security are:

·       Backup

·       Password

c) What is search engine? Write any two popular search engines.

Ans: A search engine is a Website that lets you search the Internet for Websites on specific topics.

The name of any two popular search engines is google.com and ask.com

d) Define e-commerce. Write any two benefits of it.

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

Any two benefits of e-commerce are:

·       It makes buying/selling possible 24/7.

·       It makes buying selling procedure faster, as well as easy to find products.

e) Write ant two advantages and disadvantages of social media.

Ans: Any two advantages of social media are:

·       People from anywhere can connect with anyone. Regardless of the location and religion.

·       Millions of people are using social media platforms so it has a great opportunity to promote business.

Any two disadvantages of social media are:

·       Personal data and privacy can be easily hacked and shared on the internet.

·       More chances of spreading unnecessary rumour soon.

f) What is DBMS? Write any two advantages of it.

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

Any two advantages of DBMS are:

·       It controls data redundancy which means duplication of data.

·       Large volume of data can be stored and updated easily.

 

g) What is primary key? Write any two features of it.

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

Any two features of primary key are:

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

·       To set the relationship between tables.

h) Define field and record.

Ans: A column in a table is called field, and it contains a specific piece of information within a record.  Record is a collection of multiple related fields in a row which gives complete information about a person or thing.

i) Define form. Write any two uses of it.

Ans: Form is an object of Ms-Access which provides graphical interface to enter data into the tables or multiple linked tables.

Any two uses of 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.

5. Write the output of the given program: (Workout with a dry run).  2

DECLARE SUB ABC(A)

CLS

A=2

CALL ABC(A)

END

SUB ABC(A)

FOR J= 1 TO 5

PRINT A;

A=A+3;

NEXT J

END SUB

 

Dry run

Variable

Variable

 

Output

A

J

Loop Check

 

2

1

1 to 5 Yes

2  5  8  11  14

5

2

2 to 5 Yes

 

8

3

3 to 5 Yes

 

11

4

4 to 5 Yes

 

14

5

5 to 5 Yes

 

17

6

6 to 5 No (loop exits)

 

 

Output

2  5  8  11  14

 

6. Re-write the given program after correcting the bugs:         2

DECLARE SUB Series ( )

CLS

EXECUTE Series

END

 

SUB Series( )

REM Program to generate 1 1 2 3 5 .....upto the 20th terms

A=1

B=1

FOR ctr=10 to 1

DISPLAY A:B:

A=A+B

B=A+B

NEXT ctr

END Series ( )

 

Debugged Program

 

DECLARE SUB Series ( )

CLS

CALL Series

END

 

SUB Series( )

REM Program to generate 1 1 2 3 5 .....upto the 20th terms

A=1

B=1

FOR ctr=1 TO 10

PRINT  A; B;

A=A+B

B=A+B

NEXT ctr

END SUB

 

7. Study the following program and answer the given questions.          2x1=2

DECLARE FUNCTION TEST(X)

X=100

Z=TEST(X)

PRINT Z

END

 

FUNCTION TEST(X)

FOR R=1 TO X

S=S+I

NEXT R

TEST=S

END FUNCTION

a) How many parameters are used in the above program?

Ans: The parameters are used in the above program is one.

b) How many times does the statement S=S+I execute in the above program?

The statement S=S+I will execute 100 times in the above program

 

8. Convert / Calculate as per the instruction.     4x1=4

i) (11111101)2 = (?)16

Soln:

Paired Binary Digit

1111

1101

Binary Equivalent value

F

D

 

\ (11111101)2 = (FD)16

 

ii) (245)10 = (?)2

Soln:

2

245

Remainder

2

122

1

2

61

0

2

30

1

2

15

0

2

7

1

2

3

1

2

1

1

 

0

1

 

\  (245)10 = (11110101)2

 

iii) (1010) 2 x (101) 2 =(?)2

 

 

 

1

0

1

0

 

 

x

1

0

1

 

 

1

0

1

0

 

0

0

0

0

x

1

0

1

0

x

x

1

1

0

0

1

0

 

\ (1010) 2 x (101) 2 =(110010)2

 

 

 

 

 

 

iv) (101110) 2 ¸ (110) 2

110)

101110(

0111

 

000

 

 

1011

 

 

-110

 

 

1011

 

 

-110

 

 

1010

 

 

-110

 

 

100

 

 

\ Quotient = 111

     Remainder = 100

 

 

 

 

 

 

9 a) Write a program in QBASIC that asks length, breadth of a room and calculate its area and perimeter. Create a user defined function to calculate area and sub program to calculate perimeter.

[Hint: [Area=LxB], [p=2(L+B]]

 

DECLARE FUNCTION AREA (L,B)

DECLARE SUB PER(L,B)

CLS

INPUT “Enter Length”; L

INPUT “Enter Breadth”; B

PRINT “Area of rectangle=”; AREA(L,B)

CALL PER(L,B)

END

FUNCTION AREA(L,B)

AREA = L*B

END FUNCTION

 

SUB PER(L,B)

P=2*(L+B)

PRINT “Perimeter of rectangle=”; P

END SUB

 

b) Write a program to create a sequential data file “salary.dat” to store programmer’s name, salary and post according to the need of the user.

 

OPEN “salary.dat” FOR OUTPUT AS #1

DO

CLS
INPUT “Enter name”; N$

INPUT “Enter Salary”; S

INPUT “Enter Post”; P$

WRITE #1, N$, S, P$

INPUT “Do you want to continue(Y/N)”; CH$

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

CLOSE #1

END

 

10.  Write a C program that asks a number and check whether it is negative, positive or zero.

 

 

#include<stdio.h>

#include<conio.h>

int main()

{

int n;

printf("Enter any number: ");

scanf("%d", &n);

if(n>0)

printf("%d is positive number",n);

else if(n<0)

printf("%d is negative number",n);

else

printf("%d is zero number",n);

return 0;

}

OR

Write a program in C language to display first 10 odd numbers.

#include<stdio.h>

#include<conio.h>

int main()

{

int i, a;

i=1;

a=1;

while(i<=10)

{

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

    a=a+2;

    i++;

}

return 0;

}