Table of Content

Class 12 Computer Science 2079 Question Paper Solution

Class 12 Computer Science 2079 Question Paper Solution

Class 12 Computer Science 2079 Question Paper Solution 

Sub. Code: 4281 ‘A’

NEB – GRADE XII
2079 (2022)
Computer Science (New Courses)
Solution

Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full mark.

Time: 2 hrs.                                                                                                                            Full Marks: 50

SET: I

Attempt all the questions.

Group ‘A’

Rewrite the correct options of each questions in your answer sheet. 9x1=9 

1. Which of the following SQL statement is used to DELETE rows from a database table? 
      A) DELETE            B) REMOVE           C) DROP                     D) CLEAR

2. A field that is used to uniquely define a particular record in the table is called:
      A) Primary Key     B) Entity                C) Relationship          D) Constraints

3. What does “MAC” stands for in MAC address?
      A) Mandatory Access Control
      B) Media Access Control
      C) Micro Access Control                     
      D) Media Access Certificate

4. What is the correct syntax for referring to and external JavaScript script?
      A) <script=”myscript.js”></script>
      B) <script href=”myscript.js”></script>
      C) <js href=”myscript.js”></js>
      D) <js src=”myscript.js”></js>

5. Which of the following is the correct way of defining a variable in PHP?
      A) $variable name=value;                     
      B) $variable_name=value;
      C) $variable_name=value                       
      D) $variable name as value;

6. What is the output of C program? Void main (){ int b=25; //b memory location=1234; Int *p;p=&b;print(“%d %d”, &b,p);}
      A) 25 25           B) 1234 1234         C) 25 1234      D) 1234 25

7. Which features of OOP is illustrated the code reusability?
      A) Polymorphism            B) Abstraction        C) Encapsulation         D) Inheritance

8. Which of the following is the discovering requirement from a user in the requirement collection process?
      A) Feasibility study 
      B) Requirement Elicitation
      C) Requirement Specification         
       D) Requirement validation

9. What devices are detecting and responding to change in an environment that are embedded in smart phone and an integral part of the Internet of Thing (IoT)?
      A) Wi-Fi                 B) Barcode                C) RFID                D) Sensors

Group “B”

Short answer questions; 5x5=25
10. Differentiate the centralized and Distributed database system.
Ans: The Differentiate the centralized and Distributed Database system are mentioned below; Centralized Database System:

  1. Centralized Database systems are databases that run on a single computer system.
  2. In the Centralized Database system files are kept on the basis of the location of the disk drive and names.
  3. Centralized Database Systems do not contain several sites or nodes, or several computers.
  4. It is suitable for a single organization like a school, college, industry, etc.
  5. It provides high security.
Distributed Database System:
  1. Distributed Database Systems are databases that are stored on several computers and run on several computers.
  2. In the Distributed Database System, files are kept on the basis of the name rather than location.
  3. Distributed Database system contains several computers and sites that communicate with one another through communication media.
  4. It is suitable for a large organization spread in different geographical locations, boundaries, etc.
  5. It has a high risk of data theft, hacking, etc.

Or,

What are the purpose of normalization? Give an example of 2NF.
Ans: The purpose of Normalization are given below;

  • Normalization helps remove duplicate data and database inconsistencies from relational tables.
  • It reduces redundancy and complexity by testing new data types used in tables.
  • Help split large database tables into smaller tables and link them by relation.
An Example of 2NF.
  • Table or relation must be in 1st normal form.
  • All the non-prime attributes should be fully functionally dependent on primary key.



11. Write a program to find the factorial of any given number using JavaScript. Ans:
    <html>
              <head><title>Factorial</title></head>
              <body>
                        <form>
                             <input type="number" id="num">
                             <input type"submit" onclick="fact()">
                             </form>
                                   <script>
                                         function fact()
                                     {
                                         var n= document.getElementByID("num").value;
                                         var f=1;
                                         for(var i=1;i<=n;1++)
                                     {
                                          f=f*i;
                                     }
                                         document.write(f);
                                </script>
              </body>
    </html>

Or,

 How do you fetch data from a database in PHP and display it in form? Describe.
Ans: To fetch data from the database in PHP and display it in form by using Apache Web Server, there are methods also to fetch data from a database in PHP and display it in form.

Step I: Start Apache Web Server
Step II: Create a PHP Project
Step III: Execute SQL query to create Table
Step IV: Create phpmyadmin MySQL Database Connection File Step
V: Create Fetch Data PHP File from Database

12. Compare the OOPs and procedural programming language.
Ans: Soon available 
13. What are the major activities performed to design the software? Describe.
Ans: Soon available
14. Explain the popular five-application areas of AI.

Group “C”

Long answer questions: 8x2=16
15. Compare the star and ring topology with pro and cons. Which database communication cable is more appropriate to design the local area network? Describe. 5+3
Ans: The Star topology is the most popular network topology used to connect computers and other network devices. In Star topology nodes are connected to centrally located devices, which are called Hub or Switch. Similarly, the Ring Topology is network topology, where all the nodes are connected in a closed ring. There is no ending point in the ring topology since the ends of the network are connected together to form a ring. 
Pro and Cons of Star topology are; Pro

  1. Star topology is easy to set up.
  2. It does not affect the remaining portion of the network if any node fails.
  3. In star topology, it is easy to find faults.
Cons
  1. The entire network system on star topology depends upon the central part hub or switch if the failure of the hub or switch affects the entire network.
  2. Each node is connected separately to a central devices hub or switch, more length of cable is needed.
  3. It is a little bit expensive due to the extra cables and other controlling devices.
Pro and Cons of Ring topology are; Pro
  1. It is easy to set up,
  2. High-speed data are transmission because data travel in one direction,
  3. Reduce the chance of packet collisions, due to the data flow in one direction.
Cons
  1. If any segment of cable or node falls, the entire network does not work.
  2. It is difficult to find errors in the ring topology.
  3. Adding new nodes in the network increases communication delays.
Coaxial and Twisted pair cable in more appropriate database communication to design the local area network
16. What is structure? Write a program to input roll, name and age of 5 students and display them properly using structure. 2+6 Ans:
          #include<stdio.h>
                           main()
                  {
                            struct student
                   }
                            char name [50];
                            int roll;
                            int age;
                  };
                            struct student s[100],t;
                            int i,j,n;
                            printf("\nHow many records:");
                            scanf("%d",&n)
                            for(i=0;i<n;i++)
                {
                           fflush(stdin);
                           printf("\nEnter name of student:");
                           gets(s[i].name);
                           printf("\nEnter the roll no if student:");
                           scanf("%d",&s[i].roll);
                           printf("Enter age of Student:");
                           scanf("%d",sp[i].age);
                 }
                           printf("\nstudent\t\troll");
                           printf("\n++++++++++++++++++");
                           for()i=0;i<n;i++)
                {
                           printf("\n%s\t\t\t\%d",s[i].name,s[i].roll,s[i].age);
                 }
                           printf("\n+++++++++++++");
                 {

Or,

Write a C program to enter ID, employee_name, and post of the employee and store them in a data file named "emp.txt". Display each record on the screen in an appropriate format.  Ans:

                   #include<stdio.h>
                                        main()
                      {
                                int id[50],n,i;
                                char name[50][10];
                                char post[50][10];
                                FLE *fp;
                                printf("\nHow man employees are there");
                                fp=fopen("emp.txt","w+");
                                printf("Enter employee ID Name and Post\n");
                                for(i=0;i<n;i++)
                      {
                                scanf("%d%s%s",&id[i],name[i],post[i]);
                                fprintf(fp,"%d\t%s\t%s\n",id[i],name[i],post[i]);
                      }
                                rewind(fp)
                                printf("ID\tName\tPost\n");
                                for(i=0;i<n;i++)
                      {
                                fsanf(fp."%d%s%s,&id[i],Name[i],post[i]);
                                printf("%d\t%s\t%s\n",id[i],name[i],p
 

Read More: Class 12 CompulsoryEnglish Question Paper 2080 Solution


Post a Comment