Saturday, 14 December 2024

COMPUTER SET SOLVED -3

   Shree Ratan Pandey Secondary School               

     Pokhara -13 Arva Kaski    

    Second Terminal Examination         

  Grade: 10                                                    Subject:   Computer Science 

                                                                                   F.M: 50 

                                                                                Time: 2 hours             

           Group A 

 VERY SHORT QUESTIONS                                            1X10=10

1. Define Bandwidth.

 Answer: Bandwidth is the maximum rate of data transfer that can be achieved over a given communication channel.

2. What is Mobile Computing?

 Answer: Mobile computing refers to the ability to access and process information and applications wirelessly while on the move using portable devices like laptops, smartphones, and tablets. 

3. List any two examples of DBMS.

 Answer:   MySQL, Oracle Database

4. Which view in MS Access helps us to modify table?

 Answer: Design View

 5. List out any two types of Modular programming 

 Answer:  Sub programs and Functions 

6. Define format specifiers in C language.

Answer: Format specifiers are special characters used in C programming to control the output format of data when using functions like printf and scanf. Examples include %d for integers, %f for floating-point numbers, %c for characters, and %s for strings.

2.  Write the appropriate technical term of the followings              2X1=2

a. A device that connects two dissimilar networks: Gateway

b. The technology to encode file or message: Encryption

2. Write the full form of the following terms

a. ISDN: Integrated Services Digital Network

b. SMTP: Simple Mail Transfer Protocol

Group B (2 marks each)

 4. A. Draw a figure of star topology and write its 2 advantages.

 Answer:

     Advantages:

         Centralized control: Easy to manage and troubleshoot as all traffic passes through the central hub.

         Fault isolation: If one device fails, it doesn't affect the rest of the network.

B. Define digital footprint. How can you manage your digital footprint?

    Answer: Digital footprint is the trail of data you create while using digital devices and online services.  It includes your online activity, social media posts, search history, and more.

       Managing your digital footprint involves:

  1.  Adjusting privacy settings on social media and other online platforms.
  2. Regularly reviewing and deleting old posts, accounts, and data you no longer want              associated with you.

C. What is software security? Write any two principles of information security.

 Answer: Software security refers to the measures taken to protect software from vulnerabilities and attacks that could compromise its integrity, confidentiality, and availability.

       Principles of information security:

  1.  Confidentiality: Ensuring that only authorized individuals can access and use sensitive       information. Integrity: Maintaining the accuracy and completeness of information.

   D. What is Ecommerce? Write any two advantages of Ecommerce

 Answer: Ecommerce is the buying and selling of goods and services electronically, typically over the internet.

        Advantages:

         Increased reach: Businesses can reach a global audience beyond geographical limitations.

         Reduced costs: Lower overhead costs compared to traditional brick and mortar stores.

E. What is contemporary technology? Write any two advantages of cloud computing.

 Answer: Contemporary technology refers to the latest and most advanced technologies currently in use.

     Advantages of cloud computing:

         Scalability: Resources can be easily scaled up or down based on demand.

         Cost effectiveness: Pay as you go pricing models can reduce IT infrastructure costs.

F. Differentiate between field and records in DBMS with an example.

 Answer:  Field: A single unit of data within a record. Example: In a student database, "Name," "Roll No," and "Age" would be individual fields.

     Record: A collection of related fields that represent a single entity. Example: A student's complete information (Name, Roll No, Age, etc.) would constitute a single record.

10. What is RDBMS? Write any two examples of it.

 Answer:  RDBMS (Relational Database Management System) is a type of database system that organizes data into tables with rows and columns, establishing relationships between them.

     Examples:   MySQL    Oracle Database 

G. What is DBMS? Write any two names of keys available in DBMS.DBMS: A Database Management System (DBMS) is software that enables the creation, management, and operation of databases. It allows users to store, retrieve, and manipulate data efficiently 

Two keys in DBM

A. Primary Key        B. Foreign Key

H. What is a query? Write any two ways of creating a query A query is a request to retrieve or manipulate data from a database. Queries are written in a structured query language like SQL to perform operations such as selection, insertion, deletion, and updating. 

Two ways of creating a query

 Using SQL statements like SELECT, INSERT, etc. 

Using query-building tools provided in DBMS software (e.g., Query Designer in MS Access).

3. Write down the output of the given program and show it with a dry run table.

Program:

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:

Iteration (I) S (Cumulative Sum)
1 1 1
4 64 65
7 343 408

Output:
408


4. Rewrite the given program after correcting the bugs.

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 ADD MORE RECORDS"; M$
LOOP WHILE UCASE(M$) = "Y"
END

Corrected Code:

REM to add more data in a sequential file
OPEN "EMP.DAT" FOR APPEND AS #1
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 (Y/N)? ", M$
LOOP WHILE UCASE$(M$) = "Y"
CLOSE #1
END

5. Study the following program and answer the given 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 num(N)
  IF N MOD 2 = 0 THEN num = N
END FUNCTION

Questions.

a. List the library functions used in the above program

No library functions are used in the above program.

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

The function used in the above program is num ()

Group 'C'

8. Convert/Calculate as per the instruction:

a. (A4D)16=(?)10

A * 16^2 + 4 * 16^1 + D * 16^0

= 10 * 256 + 4 * 16 + 13 * 1
= 2560 + 64 + 13
= 2637

Therefore, (A4D)₁₆ = 2637₁₀

b. (37)10 =()8
    37 ÷ 8 = 4 R 5
     4 ÷ 8 = 0 R 4

Reading the remainders from the bottom up:
45


c (10101)X(101)+(1010)2

9. Write a program in QBASIC to print the circumference of a circle using SUB and the volume of a cylinder using FUNCTION.

DECLARE SUB Circumference(R)
DECLARE FUNCTION Volume(R, H)
CLS

INPUT "Enter radius of the circle: ", R
CALL Circumference(R)

INPUT "Enter height of the cylinder: ", H
PRINT "Volume of cylinder: "; Volume(R, H)

END

SUB Circumference(R)
  C = 2 * 22 / 7 * R
  PRINT "Circumference of circle: "; C
END SUB
FUNCTION Volume(R, H)
  Volume = 22 / 7 * R ^ 2 * H
END FUNCTION

11. Write a program to display all the records of employees whose salary is more than Rs. 50,000.

OPEN "EMPLOYEE.DAT" FOR INPUT AS #1
DO WHILE NOT EOF(1)
  INPUT #1, SN, Name$, Address$, Post$, Salary
  IF Salary > 50000 THEN
    PRINT "Serial No: "; SN
    PRINT "Name: "; Name$
    PRINT "Address: "; Address$
    PRINT "Post: "; Post$
    PRINT "Salary: "; Salary
  END IF
LOOP
CLOSE #1


10. Write a program to find simple interest using C language.

#include <stdio.h>

int main() {
    float P, T, R, SI; 
    printf("Enter Principal amount: ");
    scanf("%f", &P);

    printf("Enter Time (in years): ");
    scanf("%f", &T);

    printf("Enter Rate of Interest: ");
    scanf("%f", &R);

    // Calculate Simple Interest
    SI = (P * T * R) / 100;

    
    printf("Simple Interest = %.2f\n", SI);

    return 0;
}
or Wap in C to check the students whether they are pass or fail when the pass marks is 35
#include <stdio.h> int main() { int marks; printf("Enter the marks obtained by the student: "); scanf("%d", &marks); if (marks >= 35) { printf("The student has passed.\n"); } else { printf("The student has failed.\n"); } return 0;
}


Thank you !


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 ...