Class 12 computer model questions with solutions

 MODEL QUESTIONS

Grade: XII  

Subject: Computer  

Full Marks: 50  

 Time: 2 hrs.    

Group A

Rewrite the correct options of each question in your answer sheet. (9x1=9)

1. In which normal form of database, atomicity is introduced?

A) First
B) Second
C) Third
D) Fourth

2. Which of the following techniques is not implemented to protect a database?

A) Rollback
B) Backup
C) Recovery
D) Firewall

3. Which one of the following SQL commands is executed to display all the records having a second letter in the LNAME (LAST NAME) as “A” from the customer table?

A) SELECT * FROM CUSTOMER WHERE LNAME LIKE “?A%”;
B) SELECT * FROM CUSTOMER WHERE LNAME LIKE “_A%”;
C) SELECT * FROM CUSTOMER WHERE LNAME LIKE “A%”;
D) SELECT * FROM CUSTOMER WHERE LNAME LIKE “%A”;

4. Which of the following is an incorrect IP address?

A) 192.168.0.1
B) 192.168.1
C) 172.255.0.0
D) 202.10.79.4

5. Which of the following is a server-side scripting language?

A) JavaScript
B) MySql
C) PHP
D) Jquery

6. Which of the following keywords are used to declare a variable in JavaScript?

A) int or var
B) float or let
C) var or let
D) char or var


7. Which of the following commands is executed in PHP to concatenate the variables $x with $y?
  A) $x + $y

  B) $x=$y

  C) concat ($x,$y)

  D) $x.$y

 

 

8. Which statement is incorrect about the object-oriented approach?

A) Emphasis is on data rather than procedure.
B) Data is hidden and cannot be accessed.
C) Objects communicate through functions.
D) It supports abstract data but not the class.

9. Which of the following feasibility study is concerned with cost benefit analysis?

A) Technical feasibility
B) Economic feasibility
C) Operational feasibility
D) Schedule feasibility

Group B

Short Answer Questions

10. Which type of database system (centralized or distributed) is mostly preferred by financial institution like a bank? Give any four suitable reasons.

Financial institutions like banks mostly prefer a centralized database system due to the following reasons:

 

  • Ø  Security: Centralized database systems are easier to secure as they have a single point of control, making it easier to implement access controls and monitoring.
  •  
  • Ø  Consistency: With a centralized system, data is stored in one location, ensuring consistency and reducing the possibility of data inconsistencies.
  •  
  • Ø  Easy maintenance: Maintenance is easier in a centralized system as there is only one database to maintain and backup, making it easier to perform updates, upgrades, and backups.
  •  
  • Ø  Cost-effective: Centralized systems can be more cost-effective as there are no additional costs associated with distributing data across multiple locations and servers.

 

OR

Nowadays most of the business organizations prefer applying relational model for database design in comparison to other models. Justify the statement with your arguments.

The relational model is the most widely used database model in modern business organizations for various reasons:

 

  • Ø  Simplicity: The relational model is easy to understand and use, which makes it suitable for developers with different levels of experience to design and maintain databases.
  •  
  • Ø  Flexibility: The relational model can store data in different formats and structures, making it suitable for diverse data types and use cases.
  •  
  • Ø  Standardization: The relational model has become a de facto standard for database design, which ensures consistency and compatibility across different systems and organizations.
  •  
  • Ø  Scalability: The relational model can accommodate a growing amount of data and user traffic, making it suitable for organizations of all sizes.
  •  
  • Ø  Security: The relational model provides built-in security features such as access control, data encryption, and data integrity checks, which ensure that sensitive data is protected.

11. Develop a program in JavaScript to exchange/swap the values of any two variables.

// Define two variables

let a = 5;

let b = 10;

 

// Print the original values

document.write("Before swapping, a = " + a + " and b = " + b + "<br>");

 

// Swap the values using a temporary variable

let temp = a;

a = b;

b = temp;

 

// Print the new values

document.write("After swapping, a = " + a + " and b = " + b);

OR

How can you connect a database with PHP? Demonstrate with an example.
Solution:

<?php
$servername = 
"localhost";
$username = 
"username";
$password = 
"password";
$dbname = 
"myDB";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error)

 {
  
die("Connection failed: " . $conn->connect_error);
}

$conn->close();


?>

12. Describe the concept of Object Oriented and Procedure Oriented Programming in brief.

Object Oriented Programming (OOP) is a programming paradigm that focuses on objects and their interactions with each other. It emphasizes data rather than procedures and supports abstract data types, inheritance, and polymorphism.

Procedure Oriented Programming (POP) is a programming paradigm where the program is written as a sequence of procedures or functions that manipulate data. The focus is on procedures rather than data, and the flow of execution is determined by function calls.

Following are the features of OOP

  • Ø  Encapsulation
  • Ø  Inheritance
  • Ø  Polymorphism
  • Ø  Abstraction
  • ØClasses and Objects

13. Write down any five qualities of good software.

  • Ø  Functionality: Software must fulfill its intended purpose effectively and efficiently.
  •  
  • Ø  Reliability: Software must operate consistently without any errors and prevent data loss.
  •  
  • Ø  Maintainability: Software must be easily modifiable and supportable.
  •  
  • Ø  Usability: Software must have a user-friendly interface.
  •  
  • Ø  Efficiency: Software must be able to handle large data processing without significant delays or system crashes.

14. Explain mobile computing with its advantages and disadvantages.

Mobile computing refers to the use of portable devices, such as smartphones, tablets, and laptops, to access and process data and applications while on the move.

 

Advantages of mobile computing:

 

  • Ø  Portability: Users can access information and applications from anywhere and anytime.
  • Ø  Connectivity: Mobile devices can be connected to wireless networks, cellular networks, or the internet.
  • Ø  Convenience: Mobile computing allows users to stay connected and productive on the go.
  • Ø  Efficiency: Mobile devices can perform tasks quickly and easily, reducing the need for paper-based processes.
  • Ø  Cost savings: Mobile devices are often cheaper than traditional desktops or laptops.

Disadvantages of mobile computing:

 

  • Ø  Security: Mobile devices can be more vulnerable to security threats such as viruses and malware.
  • Ø  Battery life: Portable devices have limited battery life, which can be a problem when using them for extended periods of time.
  • Ø  Compatibility: Some applications may not work properly on all devices, leading to compatibility issues.
  • Ø  Limited processing power: Mobile devices have limited processing power and memory compared to desktops and laptops.
  • Ø  Small screen size: The small screen size of mobile devices can be a limitation when working with complex applications or large amounts of data.

Group C

Give the long answers to the following questions.

15. Why do most of the business organizations prefer setting their network with the client-server architecture? Write its advantages and disadvantages.

Most business organizations prefer setting their network with the client-server architecture due to its various advantages. Some of the advantages are:

 

Advantages:

 

  • Ø  Centralized control: Client-server architecture allows centralized control, making it easy to manage and maintain the network.
  •  
  • Ø  Improved security: The client-server architecture offers improved security as all data and resources are stored on the server, which can be easily secured and backed up.
  •  
  • Ø  Scalability: It is easy to scale the network in a client-server architecture by adding more servers or clients.
  •  
  • Ø  High-performance: Client-server architecture offers high-performance as the processing is done on the server, which is usually more powerful than clients.
  •  

However, there are also some disadvantages to the client-server architecture, such as:

 

Disadvantages:

 

  • Ø  Cost: The cost of setting up and maintaining a client-server architecture can be high.
  •  
  • Ø  Dependency: Client-server architecture is dependent on the server, and if the server goes down, the clients cannot access the network.
  •  
  • Ø  Network congestion: Network congestion can occur in a client-server architecture as all requests have to go through the server.
  •  
  • Ø  Complexity: Client-server architecture can be complex to set up and maintain, requiring skilled IT professionals.

 



16. Develop a program in C using structure to ask the information of any 12 students with roll_number, name and marks scored in sub1, sub2, and sub3. Also, display them in proper format along with the calculation of total and percentage. [Note: the full marks of each subject is 100].

#include <stdio.h>

 

struct student {

    int roll_number;

    char name[50];

    int sub1, sub2, sub3;

    float total, percentage;

}s[12];

 

int main()

{   

    int i;

    for (i = 0; i < 12; i++)

{

        printf("Enter the roll number of student ");

        scanf("%d", &s[i].roll_number);

        printf("Enter the name of student");

        scanf("%s", s[i].name);

        printf("Enter the marks of subject 1 for student ");

        scanf("%d", &s[i].sub1);

        printf("Enter the marks of subject 2 for student  ");

        scanf("%d", &s[i].sub2);

        printf("Enter the marks of subject 3 for student ");

        scanf("%d", &s[i].sub3);

        s[i].total = s[i].sub1 + s[i].sub2 + s[i].sub3;

        s[i].percentage = (s[i].total / 300) * 100;

    }   

    printf("Roll No. , Name ,Subject 1 , Subject 2  ,Subject 3  ,Total ,Percentage\n");

    for (i = 0; i < 12; i++)

{

        printf("%d  %s  %d  %d  %d  %f   %f   \n", s[i].roll_number, s[i].name, s[i].sub1, s[i].sub2, s[i].sub3, s[i].total, s[i].percentage);

    }

 

    return 0;

}

 

 

No comments

Theme images by Jason Morrow. Powered by Blogger.