Saturday, 7 September 2024

COMPUTER SCIENCE SOLVED-2 FOR SEE


 

      KARUDHARA QUESTION SET COLLECTION SET NO 2

             Group A                               [6*1=6]

1.     What is unguided media?

Unguided media refers to communication channels that transmit data without requiring a physical conductor.

2.     What is the business done through the internet?

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

3.     Which data type is used to store date of birth in MS-ACCESS?

Date time data type is used to store date of birth in MS-ACCESS.

4.     Write any two elements of the database.

Tables and Queries are two elements of the database.

5.     What is modular programing?

Modular programming is a design method that divides a program into separate, self-contained modules, enhancing readability, reusability, and maintainability.

6.     Write any two features of C-language.

Two advanced features of the C-language are:

·       Pointer arithmetic

·       Dynamic memory allocation

   2. Write appropriate technical terms for the following. [2]

        a. A secret group of characters, used to protect the computer system from unauthorized users.


          Password.

        b. An artificial intelligence environment created by a computer system that appears real .

           Virtual reality.

3. Write the full form of the following. [2]

  a. URL: Universal resource Locator

  b. STP: Shielded twisted pair.

 

     Group B                                                                                                 [9X2=18]

  1. Define network topology draw a diagram of star topology.

Network topology refers to the arrangement and interconnection of various elements (nodes, links, etc.) in a computer network. It defines the physical or logical layout of a network and how different nodes (computers, devices) are connected and communicate with each other. 

 




Write any four commandments of computer ethics.

1.     We should not use a computer to harm other people.

2.     We should not interfere with other people's computer work.

3.     We should not snoop around in other people's computer files.

4.     We should not use a computer to steal.

3.     What are the Common Computer Security Threats. Mention any two measures to protect from security threats.

1.     Malware: Malicious software designed to damage, disrupt, or gain unauthorized access to computer systems.

2.     Phishing: Fraudulent attempts to obtain sensitive information by disguising itself as a trustworthy entity in electronic communications.

Measures to Protect Against Security Threats

1.     Use Antivirus Software: Install and regularly update antivirus software to detect and remove malware.

2.     Enable Multi-Factor Authentication (MFA): Add an extra layer of security by requiring multiple forms of verification before granting access to accounts or systems.

       4. What is Artificial Intelligence (AI)?

Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think and learn like humans. AI systems can perform tasks such as problem-solving, decision-making, and language understanding. Examples of AI:

1.     Voice Assistants: Devices like Amazon Alexa and Google Assistant use AI to understand and respond to voice commands.

2.     Self-Driving Cars: Companies like Tesla use AI to enable cars to navigate and drive autonomously

 5. What is E-commerce?

E-commerce, or electronic commerce, refers to the buying and selling of goods and services over the internet. It includes various types of business transactions, such as retail sales, online auctions, and business-to-business (B2B) exchanges.

Two E-commerce Companies in Nepal:

1.     Daraz Nepal: One of the largest online marketplaces in Nepal, offering a wide range of products from electronics to fashion1.

2.     SastoDeal: A leading e-commerce platform in Nepal, known for its diverse product categories and competitive prices.

6.   List any four features of MS- ACCESS.

  Any four features of MS- ACCESS ARE

1.     Importing data from Excel or other databases.

2.     Creating forms for data entry or viewing.

3.     Designing and running data retrieval queries.

4.     Designing reports to be either printed or turned into a PDF.

 

7. What is primary key? Give any two benefits of it.

Primary Key is a unique identifier for each row in a database table. It ensures that every record has a distinct value, preventing duplicate entries.

Two key features of a primary key:

1.     Uniqueness: Each row must have a unique primary key value. This prevents data redundancy and inconsistencies.

2.     Non-Null: A primary key cannot contain null values. This ensures that every record can be uniquely identified.

8. Write the difference between SELECT QUERY and ACTION QUERY.

Aspect

SELECT Query

APPEND Query

Purpose

Retrieves data from one or more tables.

Adds data from one table to another existing table.

Operation

Reads data without modifying the source tables.

Inserts data into a target table, modifying its contents.

Result

Returns a result set (rows) based on the specified criteria.

Adds rows to the target table based on the specified criteria.

Syntax

SELECT column1, column2 FROM table WHERE condition;

INSERT INTO target_table (column1, column2) SELECT column1, column2 FROM source_table WHERE condition;

Use Case

Used for data retrieval and analysis.

Used for data migration or combining data from multiple sources.

Impact

No changes to the database.

Changes the database by adding new rows to the target table.

9. Identify a record table and field from the following table. [2]

Symbol no

Name

Marks

00100202S

Aarambha Shrestha

91

00100230T

Suhisha raymajhi

99

 

 

 

Fields:

1.     Symbol no

2.     Name

3.     Marks

Records:

1.     Record 1:

o   Symbol no: 00100202S

o   Name: Aarambha Shrestha

o   Marks: 91

2.     Record 2:

o   Symbol no: 00100230T

o   Name: Suhisha Raymajhi

o   Marks: 99

 

5. Write down the output of the given program and show them in a dry run table. [10 ]

DECLARE FUNCTION SQN (N)

CLS

S=0

FOR L=1 TO 3

READ NUM

S=S+SQN (NUM)

NEXT L

PRINT "Sum of square"; S

DATA 1, 4, 5

END

FUNCTION SQN (N)

SQN = N^2

END FUNCTION

 

 

 

 

S=0

FOR I = 1 TO 3

READ 1,4,5

S=S+SQN

SQN=N^2

 

1 TO 3 YES

1

1

1^1=1

 

2 TO 3 YES

4

1+16=17

4^4=16

 

3 TO 3 YES

5

17+25=42

5^5=25

 

4 TO 3 NO

 

 

 

 

 

LOOP EXISTS

 

 

 

The output of the program is: 42

6.  Rewrite given program after correcting the bugs:

DECLARE SUB Square (A)

REM to print square of a input number

CLS

GET "Enter a number"; N

Square (N)

END

SUB Square (A)

Sq = A^ 4

Display "Square of a number is "; Sq

End Sub

AFTER DEBUGGING

DECLARE SUB Square (A)

REM to print square of a input number

CLS

INPUT "Enter a number"; N

CALL Square (N)

END

SUB Square (A)

Sq = A^ 2

PRINT "Square of a number is "; Sq

End Sub

 

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

DECLARE FUNCTION Count (W$)

INPUT "Enter a word"; R$

C = Count (R$)

PRINT C

END

FUNCTION Count (W$)

FOR L = 1 TO LEN (W$)

Ch$MID$ (W$, L, 1)

IF UCASES (Ch$) = "K" THEN

N=N+1

END IF

NEXT L

Count = N

END FUNCTION

1. List any two library functions used in the above program.

LEN () and UCASE() are the two library functions used in the above program

2.Write the use of variable 'C' in line 3 [i.e. C = Count (R$)] given in the above program.

            The use of variable ‘C’ in line 3 [i.e. C = Count (R$)] given in the above program is to store the value

           returned by the function count ()

    GROUP C                            4*4=12

A.    Write a program in QBASIC that asks length, breadth and height of room and calculate its area and

volume. Create a User Defined Function to calculate Area and Sub Program to calculate the Volume.

[Hint: Area LxB and Volume = LxBxH]

DECLARE FUNCTION AREA(L,B)

DECLARE SUB VOLUME (L,B,H)

CLS

INPUT “Enter Length”; L

INPUT “Enter Breadth”; B

INPUT “Enter Height”; H

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

CALL VOL(L,B,H)

END

FUNCTION AREA(L,B)

AREA = L * B

END FUNCTION

SUB VOLUME(L,B,H)

V=L*B*H

PRINT “Volume of Room=”; V

END SUB

 

B. Employee's name, address, gender and salary are stored in the "EMP.DAT" sequential data file.

Write a QBASIC program that displays all information about personnel whose salaries exceed 60000.

OPEN "EMP.DAT" FOR INPUT AS #1

CLS

WHILE NOT EOF (1)

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

IF SALARY > 60000 THEN

PRINT N$, A$, G$, SALARY

WEND

CLOSE #1

END

10. Write a program in 'C' language to find simple interest where user need to input Principle, Rate and

Time.

#include <stdio.h>

int main() {

    float p, t, r, si;

    printf("Enter principal, time, and rate: ");

    scanf("%f %f %f", &p, &t, &r);

    si = (p * t * r) / 100;

    printf("The simple interest is %f\n", si);

    return 0;

}

Or

Write a program in 'C' language to display the series with their sum. 1,2,3,4, up to 10th term.

#include <stdio.h>

 

int main() {

    int sum = 0;

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

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

        sum += i;

    }

    printf("Total Sum = %d\n", sum);

    return 0;

}

Note: Number system have not been included in this webpage.

 

http://www.milanbaral123.blogspot.com

No comments:

Post a Comment

SEE IMP QUESTIONS C LANGUAGE

  Write a C program to calculate simple interest . The program should accept the principal amount , rate of interest , and time period as ...