Monday, August 19, 2024

Set 3: SOLVED PABSON 2080 (Bagmati) SEE COMPUTER SCIENCE

 


Set 3: PABSON 2080 (Bagmati)

Opt. II Computer Science

Time : 2 hours                                                                                                                       Full Marks: 50

Candidates are required to give their answer according to the given instructions.

Attempt all questions.

Group 'A

1. Answer the following questions in one sentences.

a)     Which connector is used with coaxial cable?

Ans: BNC (Bayonet Neill-Concelman) connector is used with coaxial cable.

 

b)    Why data decryption is necessary?

Ans: Data decryption is necessary to convert encrypted data back into its original form so that it can be understood by the intended recipient.

 

c)     Which data types are used to store graphics and numeric characters in MS-Access?

Ans: OLE Object is used for graphics, and Number is used for numeric characters in MS-Access.

 

d)    List any two objects of MS-Access.

Ans: Tables and Queries are two objects of MS-Access.

 

e)     What is the function of MOD in Qbasic.

Ans: MOD returns the remainder of a division between two numbers.

 

f)      Write the name of unary operators used in C language.

Ans: Increment (++) and Decrement (--) are unary operators used in C language.

2. Write appropriate technical term for the following:

a)     The protection of computer systems and sensitive information from unauthorized access, theft or damage.  Cybersecurity.

b)     The Internet tool which is used to upload/download. FTP (File Transfer Protocol).

3. Write the full form of the following:

a)     VOIP - Voice Over Internet Protocol

b)     ISDN - Integrated Services Digital Network

Group B

4. Answer the following questions:

a)     What is topology? Draw the figure of star topology.

Ans: Topology refers to the physical or logical arrangement of a network.

Text Box:
 

 

 

 

 

 

 

 


b)    What is cyber-ethics? List out any two cybercrimes.

Ans: Cyber ethics is a set of moral principles or code of conducts that regulate the use of computers systematically without making harm to other users.

Two examples of cybercrimes are identity theft and phishing.

 

 

 

 

c)     What is hardware security? Write any two measures of software security.

Ans: Hardware security refers to the protection of physical devices from unauthorized access and damage. Two measures of software security are using strong passwords and regularly updating software.

 

d)    What is E-government? Give any two examples.

Ans: E-Governance is a set of services provided by the government to public via electronic media especially using Internet. Examples: Online tax filing systems, digital voter registration.

 

e)     Define cloud computing with example.

Ans: Cloud computing is the delivery of computing services such as storage, databases, and software over the internet. Example: Google Drive

 

f)      Differentiate between Database and DBMS.

Ans: The difference between Database and DBMS are:

Database

DBMS

A collection of systematically organized inter-related data  which store, organize and retrieve data is called a database.

Database management system (DBMS) is a computerized system that stores data, processes them and provides information in an organized form

Eg. Dictionary, Marks Ledger, Telephone Directory, Attendance Register etc.

E.g. MS-Access, Oracle, MS-SQL Server, MySQL, PostgreSQL etc

 

g)     What is primary key? Write its importance.

Ans: A primary key is a field or combination of fields in a table that uniquely identifies each record, and is used to establish relationships between tables and enforce data integrity.

Its importance is :

It sets the relationship between tables.

It reduces and controls duplication of record in a table.

 

h)    What is data type? List any two data types of MS- Access.

Ans: Data type is an attribute for a field that determines the type of data that can be stored in that field. Two data types in MS-Access are Text and Date/Time.

 

i)      Why update query is necessary in Database system? Give reason.

Ans: An update query is necessary to modify existing data in a database. It helps keep data accurate and up-to-date.

 

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

DECLARE SUB show ( )

CLS

CALL show

END

SUB show

FOR I = 1 TO 7 STEP 3

S = S + I ^ 3

NEXT I

PRINT S

END SUB

 

 

Dry Run Table

I = 1 TO 7 STEP 3

S = S + I ^ 3

PRINT S

 

1 to 7 step 3 yes

0+1^3

=0+1=1

408

 

4 to 7 step 3 yes

1+4^3

=1+64=65

 

 

7 to 7 yes

65+7^3

=65+343=408

 

 

10 to 7 no

Loop exits

 

 

 

 

 

 

 

 

The output of the program is:

408

 

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

REM display records of students from sequential data file.

OPEN “STUDENT.DAT” FOR INP AS #1

PRINT “SNO”, “NAME”, “ADDRESS”, “CLASS”, “SECTION”

WHILE NOT EOF

INPUT #1, SN, N$, AD$, C, SE$

PRINT SN, N$, AD$, C, SE$

NEXT

CLOSE #1

STOP

 

Debugged Program

 

REM display records of students from sequential data file.

OPEN "STUDENT.DAT" FOR INPUT AS #1

PRINT "SNO", "NAME", "ADDRESS", "CLASS", "SECTION"

WHILE NOT EOF(1)

INPUT #1, SN, N$, AD$, C, SE$

PRINT SN, N$, AD$, C, SE$

WEND

CLOSE #1

END

 

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

DECLARE FUNCTION num (N)

FOR I = 1 TO 5

READ N

Z = num(N)

S = S + Z

NEXT I

PRINT S

DATA 11, 14, 16, 5, 7

END

FUNCTION sum (N)

IFN MOD 2=0 THEN num=N

END FUNCTION

Questions:

a. List the library function used in the above program.

Ans: No, library function used in above program.

b. Write the name of the function used in the above program.

Ans: Num( ) is the name of the function used in the above program

Group 'C'

8. Convert/calculate as per the instruction:

a. (101110111)2 = (?)8

Convert every 3 binary digits (from bit0) to octal digit (see conversion table below):

101110111

= 101 110 111

101= 5

110=6

111=7

= 567

(101110111)2 = (567)8

 

b.(248)10 = (?)2

Divide by the base 2 to get the digits from the remainders:

Division
by 2

Quotient

Remainder

(Digit)

(248)/2

124

0

(124)/2

62

0

(62)/2

31

0

(31)/2

15

1

(15)/2

7

1

(7)/2

3

1

(3)/2

1

1

(1)/2

0

1

= (11111000)2

(248)10 = (11111000)2

 

c. (1101)2 x (110)2 -  (1011)2 = (?)2

 

 

 

 

 

 

 

1

1

0

1

 

 

 

 

 

 

x

1

1

0

 

 

 

 

 

 

0

0

0

0

 

 

 

 

 

1

1

0

1

x

 

 

 

 

1

1

0

1

x

x

 

 

 

1

0

0

1

1

1

0

 

 

 

 

 

-

1

0

1

1

 

 

 

1

0

0

0

0

1

1

 

(1101)2 x (110)2 -  (1011)2 = (1000011)2

 

d. (1011101)2 ¸ (101)2

 

            101)

1

0

1

1

1

0

1

(10010

-

1

0

1

 

 

 

 

 

 

0

0

0

1

1

0

 

 

 

 

 

-

1

0

1

 

 

 

 

 

 

0

0

1

1

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

1

1

 

 

 

 

 

 

 

 

 

 

 

            Q=10010

            R=11

9. a. WAP in QBASIC to print circumference of a circle using SUB and volume of a cylinder using

 

DECLARE SUB Circumference (R)

DECLARE FUNCTION VolumeCylinder (R, H)

CLS

INPUT "Enter radius of the circle: ", R

INPUT "Enter height of the cylinder: ", H

CALL Circumference(R)

PRINT "Volume of cylinder: "; VolumeCylinder(R, H)

END

 

SUB Circumference (R)

C = 2 * 22 / 7 * R

PRINT "Circumference of the circle: "; C

END SUB

 

FUNCTION VolumeCylinder (R, H)

VolumeCylinder = 22 / 7 * R ^ 2 * H

END FUNCTION

 

b. A sequential data file “Employee.dat” has some records with field's serial number, name. Address, post and salary for the number of employees. Write a program to display all the records of those emplovee's whose salary is more than Rs. 50000.                                                                   [4]

 

OPEN "Employee.dat" FOR INPUT AS #1

PRINT "SN", "NAME", "ADDRESS", "POST", "SALARY"

WHILE NOT EOF(1)

INPUT #1, SN, N$, AD$, P$, SAL

IF SAL > 50000 THEN

PRINT SN, N$, AD$, P$, SAL

END IF

WEND

CLOSE #1

 

10. Write a program to read any three integer numbers from the keyboard and find the smallest number using C language.                                                                                                          [4]

 

#include <stdio.h>

int main() {

    int num1, num2, num3;

    printf("Enter three integers: ");

    scanf("%d %d %d", &num1, &num2, &num3);

 

    if (num1 < num2 && num1 < num3)

        printf("Smallest number: %d\n", num1);

    else if (num2 < num1 && num2 < num3)

        printf("Smallest number: %d\n", num2);

    else

        printf("Smallest number: %d\n", num3);

    return 0;

}

 

OR

Write a program to print first 10 natural number using C language.

 

#include <stdio.h>

int main() {

    int i;

    for (i = 1; i <= 10; i++) {

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

    }

    return 0;

}

No comments:

Post a Comment