+1 and +2 Computer Science

Previous Question paper answered , and Questions from Textbook

+1 and +2 Computer Application

Previous Question paper answered , and Questions from Textbook

Diploma in Computer Application (DCA)

Previous Question paper answered , and Questions from Textbook.

Master of Computer Applications (MCA)

Previous Question paper answered , and Questions from Textbook

True IQ Computer Online Academy

Contact : +91 9036433020 , mail2trueiq@gmail.com

Pageviews

Tuesday 28 July 2020

+2].11-Advances of Computing Previous Questions Chapter wise



                                 PLUS TWO  COMPUTER SCIENCE


                             Second Year Computer Science Previous Questions Chapter wise ..

                                           Chapter 11. Advances of Computing



1. (a) The computing technology in which a problem is broken into pieces and solved concurrently is            called __________.

          Ans. Parallel Computing

    (b) Categorise the cloud service models.

            Cloud services are grouped into three – Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). 

 SaaS gives access to both resources and applications. Google Docs, Office365, facebook.com are examples. 

PaaS gives access to the components that we require to develop and operate applications on Internet. LAMP, ASP.NET, Google’s App Engine are some examples.

 IaaS provides basic storage and computing capabilities. Servers, networking equipments, data centre space etc. will be available as infrastructure where we can set up our software. Amazon Web Services, AT&T are some examples.

 Advantages: Cost savings; Flexibility; Reliability; Mobile accessibility.
 Disadvantages: Security and privacy; Lack of standard.

2. Define Robotics.

         : It is the scientific study associated with the design, fabrication, theory and application of robots. Robot is an electromechanical device which is capable of reacting to its environment and take autonomous decisions or actions to achieve a specific task. They are used in vehicle manufacturing industry, exploration of outer space, military, agriculture etc.

3. Give any three advantages and disadvantages of grid computing.

     1. Solves larger complex problems in short time.

      2.  Better use of existing hardware.

   3.  Easy to increase computing power by adding desktops or servers.

4. (a) A widely used operating system for cluster computers is _____.

        Ans. Linux

    (b) Discuss advantages of grid computing, cluster computing and cloud computing.

        Advantages of Grid computing :Solves larger complex problems in short time; Better use of existing hardware; Easy to increase computing power by adding desktops or servers.

    Advantages of Cluster computing :Reduces cost of processing; Failure of one system will not affect the processing; More components can be added.

   Advantages Cloud computing: Cost savings; Flexibility; Reliability; Mobile accessibility.

 5. NLP is ___________.


(a) National Level Programming

 (b) Natural Language Processing

(c) Neural Level Programming

(d) None of the above

    Ans. b

 6. What is ANN?

         Artificial Neural Networks (ANN) is the research in algorithmic modeling of biological neural system. It focuses on human brain that has the ability to perform tasks such as pattern matching, perception and body movements, and also the ability to learn, memorise, generalize etc. 

7. Write any two advantages of parallel computing compared to serial computing

       Serial Computing                                                              Parallel Computing

 (a) Single processor is used.                                                  (a) Multiple processors with shared memory.                                                                                          
                                                                                                 ( b) Instructions are executed concurrently

(b) Instructions are executed sequentially.                           
      


+2].11- Advances of Computing - Solved Questions from textbook


                   
                                PLUS TWO  COMPUTER SCIENCE

                                     Chapter 11. Advances of Computing

                           (+2. Computer Science Questions and answers from text book)


1. List the advances of cluster computing?

          Reduces cost of processing; Failure of one system will not affect the processing; More components can be added.

 2. What is cloud computing.

          It refers to the use of computing resources that reside on a remote machine and are delivered to the end user as a service over a network. It uses Internet and central remote servers to maintain data and applications. E-mail is an example.

 3. Name the different cloud computing models.

          Cloud models come in three types: SaaS (Software as a Service), IaaS (Infrastructure as a Service) and PaaS (Platform as a Service). Each of the cloud models has their own set of benefits that could serve the needs of various businesses.

4. What is software as a service?

        SaaS gives access to both resources and applications. Google Docs, Office365, facebook.com are examples.

5. Name two SaS providers.

        Google Docs, Office365, facebook.com

 6.  Specify the name of any two providers of IaaS.

            Amazon Web Services, AT&T

7. What is the difference between OCR and HCR systems?

       Optical Character Recognition (OCR) and Handwritten Character Recognition (HCR) ,the task of OCR and HCR are integral parts of pattern recognition. The software converts scanned images of printed text or the text written on the screen into computer processable format (ASCII or Unicode).

8. What is the natural language processing?

        It is branch of computer science that focuses on developing systems which allow computers to communicate with people using human languages such as English, Malayalam etc

9. Give an example where  computer vision is used.

       Computer vision is necessary to enable self-driving cars. Manufacturers such as Tesla, BMW, Volvo, and Audi use multiple cameras, lidar, radar, and ultrasonic sensors to acquire images from the environment so that their self-driving cars can detect objects, lane markings, signs and traffic signals to safely drive.

10. ANN is 

         Artificial Neural Networks

11. The scientific study associated with the design,fabrication,theory and application of robots is called--------------

      Ans. Robotics

12. Explain the feature of distributed computing.

       It is a method of computing in which large problems are divided into many small problems and these are distributed to many computers in a network. Later, the small results are assembled to get the final solution. Advantages: Economical, Speed, Reliability, Scalability. Disadvantages: Complexity, Lack of security

13. Compare serial and parallel computing.

     
          Serial Computing                                                                                              Parallel Computing

 (a) Single processor is used. 
  (b) Instructions are executed sequentially.                                             (a) Multiple processors with shared memory. 
                                                                                                                (b) Instructions are executed concurrently.

14. What is computational intelligence?

        (commonly referred to as AI) is the study of adaptive mechanisms (algorithms) to facilitate intelligent behavior in complex and changing environment so as to solve real life problems. The four main paradigms (paradigm means a pattern or model in the study of a complex subject) of Computational Intelligence are Artificial Neural Networks (ANN), Evolutionary Computation (EC), Swarm Intelligence (SI) and Fuzzy Systems (FS).

 Artificial Neural Networks (ANN) is the research in algorithmic modeling of biological neural system. It focuses on human brain that has the ability to perform tasks such as pattern matching, perception and body movements, and also the ability to learn, memorise, generalize etc.

 Evolutionary Computation (EC) has its objective to mimic processes from natural evolution. It focuses on the survival of the fittest and death of the weak. EC is used in data mining, fault diagnosis etc. 

Swarm Intelligence (SI) is originated from the study of colonies or swarms of social organisms. Choreography of bird flocks and foraging behavior of ants led to different optimization algorithms.

 Fussy Systems (FS) allows reasoning with uncertain facts to infer new facts. In a sense, fuzzy logic allows the modeling of common sense. Fuzzy systems have been applied in gear transmission in vehicles, controlling traffic signals etc.

 15. Define cybermetics?

       The study of human-machine interaction to solve real life problems led to the development of Cybernetics. It is defined as the study of control and communication between man and machines.

  16. The test used to decide whether a machine is intelligent or not is called-----------

        Ans. Turing test

   17. What is ANN?

           Artificial Neural Networks (ANN) is the research in algorithmic modeling of biological neural system. It focuses on human brain that has the ability to perform tasks such as pattern matching, perception and body movements, and also the ability to learn, memorise, generalize etc

    18. Explain swarm intelligence.

           Swarm Intelligence (SI) is originated from the study of colonies or swarms of social organisms. Choreography of bird flocks and foraging behavior of ants led to different optimization algorithms

     19. Explain fuzzy systems.

              Fussy Systems (FS) allows reasoning with uncertain facts to infer new facts. In a sense, fuzzy logic allows the modeling of common sense. Fuzzy systems have been applied in gear transmission in vehicles, controlling traffic signals etc.

     20. List some uses of biometrics.

                : It refers to the measurements (metrics) related to human characteristics. It is used in identification of individual in terms of finger print, palm veins, face, hand geometry, iris, retina and odour.

      21. List the use of robots.

                  Robot is an electromechanical device which is capable of reacting to its environment and take autonomous decisions or actions to achieve a specific task. They are used in vehicle manufacturing industry, exploration of outer space, military, agriculture etc.



+2].10-Server Side Scripting Using PHP Previous Questions Chapter wise


                           
                                            PLUS TWO  COMPUTER SCIENCE


                               Second Year Computer Science Previous Questions Chapter wise

                                                  Chapter 10.Server Side Scripting Using PHP

1. PHP is

 (a) freeware

 (b) proprietary 

(c) both

 (d) none 

   Ans.  a

2. (a) Compare Indexed and Associative arrays in PHP. 

 (b) Write a PHP program to display prime numbers below 50.

 (c) Write a PHP program to display the perfect numbers below 100. 

  Ans. a) Arrays  with numeric index are called indexed arrays.They use non negative integers as keys.These  arrays can store numbers,strings and any object but their index will be represented by numbers. The function array() can be used to create an array.

         Arrays with named keys are called associative arrays.These are very similar to numeric arrays in terms of functionality but  they are different in terms of their index.

  b.

<?php
    for($i = 1; $i <= 50; $i++)
      $mm = 0;
      for($j = 2; $j <= $i/2; $j++) {
        //only not prime numbers
                if ($i % $j == 0) {
                  $mm++;
                  break;
                }
      }
      if ($mm == 0) {
                echo"$i is prime number<br/>";
      }
    }
  ?>
 c.
<?php

($number % $n)

 { $d += $n; 

if ($n <> $number / $n)

 $d += $number / $n; 

}

 }

 return ++$d == $number;

 } // * example use - display perfect numbers below 100 * // 

for ($n = 1; $n < 100; $n++)

 if (is_perfect($n))

 echo $n . '<br />'; 

?>

        
 3. An array in PHP is given as follows: $family = array(“Father”=>”Ajay”, “Son”=>”Arjun”, “Daughter” =>”Archana”).
 Name the type of this array. Write a for each loop that prints all the array elements.

 4. (a) What are the differences between GET and POST methods in form submitting? 

  Ans. 
          Ans. The two methods are distinct where GET method adds the encoded data to the URI while in case of POST method the data is appended to the body rather than URI. Additionally, GET method is used for retrieving the data. Conversely, POST method is used for storing or updating the data.

(b) Study the following steps and determine the correct order: 

  1. Open a connection to MySQL server 

 (2) Execute the SQL query 

(3) Fetch the data from query. 

(4) Select database 

(5) Close connection 

(a) 4, 1, 2, 3, 5

 (b) 1, 4, 2, 3, 5

 (c) 1, 5, 4, 2, 3

 (d) 4, 1, 3, 2, 5

Ans. b

 5. A web server that supports PHP on any operating system is ____.  

     Ans. WAMP or LAMP or XAMPP

 6. Discuss about special data types used in PHP. 

 Ans.    1. Integer : Integers hold only whole numbers including positive and negative numbers, i.e., numbers without fractional part or decimal point. They can be decimal (base 10), octal (base 8) or hexadecimal (base 16).


2. Double: Can hold numbers containing fractional or decimal part including positive and negative numbers. By default, the variables add a minimum number of decimal places.


3. String : Hold letters or any alphabets, even numbers are included. These are written within double quotes during declaration. The strings can also be written within single quotes but it will be treated differently while printing variables.


4. NULL: These are special types of variables that can hold only one value i.e., NULL. We follow the convention of writing it in capital form, but its case sensitive.


5. Boolean: Hold only two values, either TRUE or FALSE. Successful events will return true and unsuccessful events return false. NULL type values are also treated as false in Boolean. Apart from NULL, 0 is also consider as false in boolean. If a string is empty then it is also considered as false in boolean data type.


6. Arrays: Array is a compound data-type which can store multiple values of same data type. Below is an example of array of integers.


7. Objects: Objects are defined as instances of user defined classes that can hold both values and functions.


8. Resources: Resources in PHP are not an exact data type. These are basically used to store references to some function call or to external PHP resources. For example, consider a database call. This is an external resource.

 7. Create an HTML form in PHP showing the difference between GET and POST method. 

     GET and POST are the values used with Method attribute of tag. The skeleton of the HTML form with these methods will be as follows: .............
.............
When we use GET method, the data remains visible in the address bar since contents are passed as part of the URL. GET can send only 2000 characters. But if we use POST method, the data is not visible as contents are passed to the script as an input file. There is no limit in the size of data.  

8. Write a function in PHP to find the factorial of a number. 


          

 9. Write a PHP program to find the biggest of three numbers. 

          Assume that num1, num2, num3 are the names of the textboxes in the HTML Form submitted to the php program. 

<?php

      $n1 = $_GET[‘num1’];

      $n2 = $_GET[‘num2’]; 

        $n3 = $_GET[‘num3’]; 

if ($n1>$n2) $big = $n1; 

else 

$big = $n2; 

if ($n3>$big)

 $big = $n3; 

echo “Biggest Number is ”.$big; 

?>

 10. (a) What are the differences between echo and print statements? 

     Ans.  Both used to output data to the screen. The differences are small: echo has no return value while print has a return value of 1 so it can be used in expressions. echo can take multiple parameters (although such usage is rare) while print can take one argument. echo is marginally faster than print.
 
      (b) What is the difference between PHP and JavaScript?

                    Javascript                                                                                  php
Does job for Both Front-end and Back-end.Php is used mostly for Back-end Purposes only.
Javascript is asynchronous, It doesn’t wait for Input Output operations.Php is synchronous, It waits for IO operations to execute.
Can be run in browsers and after Node, we can also run it in Command line3.Php requires a Server to Run. Cannot run without a server.
Js can be combined with HTMl, AJAX and XML.Can be combined with HTML only.
It is a single threaded language that is event-driven which means it never blocks and everything runs concurrently.It is multi-threaded which means it blocks I/O to carry out multiple tasks concurrently.




+2].10 - Server side scripting using PHP - Solved questions from text book



                               PLUS TWO  COMPUTER SCIENCE

                                     Chapter 10. Server Side Scripting Using PHP

                           (+2. Computer Science Questions and answers from text book)





1. PHP stands for 
 
Ans. PHP hypertext preprocessors

2.  php file have a default  file extension of

   Ans. .php

3. Who is known as the father of php?

  Ans. Rasmus Lerdorf

4. In php ---------- is used for a single line comment

   Ans. //(double slash)

5. WAMP stands for

  Ans. Windows,Apache,Mysql,php

6. LAMP stands for

   Ans. Linux,Apache,Mysql,php

7. php script start with ------- and end with -------------

Ans. <? and ?>

8. Varaibles always start with a php in

  Ans. $

9. The php syntax is similar to that of language

  Ans. C++

10. The dot(.)operator is used for -------

  Ans. Concatenating operator

11. Arrays that used string keys are called

   Ans. Associative Arrays

12. -------------- function is used in php to return the length of the string

   Ans. strlen()

13. Multiple outputs can be made only with -------- command

   Ans.  echo

14. In php  by default array index starts from

  Ans. zero

15. GET can only send -------- characters.

  Ans. 2000

16. What is php?

    PHP is an acronym for "PHP: Hypertext Preprocessor.PHP is a widely-used, open source scripting language .PHP scripts are executed on the server.PHP is free to download and use.

 17. What is the difference between php and javascipt?

       PHP is server-side scripting language whereas Javascript is a client-side scripting language. PHP doesn't execute within browser whereas Javascript executes within browser. PHP supports database whereas Javascript doesn't support databases. PHP accepts both upper case and lower case variables while Javascript doesn't.

18. What is the use of  ' echo' in php?

      Multiple outputs can be made only with echo command.

19. What is the use of "print" in php?

    It used to display output.
 
20. Which character is used to terminate a php statement?Name one situation  where  omitting this termination character  doesnot produce an error?

    Semicolon(;) character is used to terminate a php statement.For the last statement of php code semicolon is not compulsory.


                                                                                                                                                        


                                                                                                                                



+2].3 - Data Structures and Operations Solved Questions from textbook



                                 PLUS TWO  COMPUTER SCIENCE

                                            Chapter 3. Data Structures and Operations

                           (+2. Computer Science Questions and answers from text book)





 1. Define  data structure?

     Data structure is a particular way of organising logically related data items which can be processed as a single unit.Depending upon memory allocation, data structures may be classified as static data structures and dynamic data structures. Memory allocation is fixed for static data structures (eg: arrays) and the size cannot be changed during execution. Memory is allocated during execution for dynamic data structures (eg: linked list) and the size changes according to the addition or deletion of data items.

 2. Stack  follows    ------------- principal for organising data.

     Ans. LIFO

3.  Name the data structure that follows FIFO principal.

     Ans. Queue.

4.  What  is meant by underflow?

      If we try to delete an item from an empty stack, an unfavourable situation arises, known as stack underflow. If we attempt a deletion from an empty queue, underflow occurs.

                            Implementing the Stack Data Structure in Javascript - DEV Difference between Stack and Queue Data Structures - GeeksforGeeks

5.  Which element of  stack  can be deleted first or last.

    Ans. First

 6. Name an example for dynamic data structure.

     Ans. Linked list

  7. What is linked list?

         Linked list is a collection of nodes, where each node consists of two parts – a data and a link. Link is a pointer to the next node in the list. The address of the first node is stored in a special pointer called START. Linked list is a dynamic data structure. Memory is allocated during run time. So there is no problem of overflow. It grows as and when new data items are added, and shrinks whenever any data is removed. Linked list is created with the help of self referential structures.

   8. A node of linked list consists of ------------- and -------------.

      Ans. Data and Link

    9. Which is the  facility of programming language used to define the node of a linked list?

      Ans. Pointer

    10. What is the content of Start and Header of a linked list.

         Ans. Start or Header is the address of the content of the first node.

11.    What are the application of queue?

          Serving requests on a single shared resource, like a printer, CPU task scheduling etc. In real life scenario, Call Center phone systems uses Queues to hold people calling them in an order, until a service representative is free. Handling of interrupts in real-time systems.

12. What is traversing?
   
           Traversing is an operation in which each element of a data structure is visited.

13. What is merging?

     Merging is the process of combining elements of two sorted data structures to form a new one.

14. What is meant by Stack overflow?

           It is the process of inserting a new data item into the stack at Top position. Once the stack is full and if we attempt to insert an item, an impossible situation arises, known as stack overflow.

15. Explain the classification of compound data structures?

       compound data structure divided into two types

 a) Linear Data Structure and b) Non Linear Data Structure.

                               Difference between Linear and Non-linear Data Structure (with ...

   A Linear data structure have data elements arranged in sequential manner and each member element is connected to its previous and next element. ... Such data structures are easy to implement as computer memory is also sequential. Examples of linear data structures are List, Queue, Stack, Array etc.

Non-linear Data Structure: Data structures where data elements are not arranged sequentially or linearly are called non-linear data structures. In a non-linear data structure, single level is not involved.

16. Different type of linked list?

           Singly Linked List

It is the most common. Each node has data and a pointer to the next node.
 
 singly linked list

Doubly Linked List

We add a pointer to the previous node in a doubly-linked list. Thus, we can go in either direction: forward or backward.
doubly linked list

Circular Linked List

A circular linked list is a variation of a linked list in which the last element is linked to the first element. This forms a circular loop.




+2].3-Data Structures and Operators Previous Questions Chapter wise


                             PLUS TWO  COMPUTER SCIENCE


                    Second Year Computer Science Previous Questions Chapter wise ..

                                                  Chapter 2.Data Structures and Operators

                                       






1. Attempting to insert in an already full stack leads to _________


   Ans. Overflow

2. Explain how push operation is done in a stack. 

      Push Operation is the process of inserting a new data item into the stack at Top position. Once the stack is full and if we attempt to insert an item, an impossible situation arises, known as stack overflow

3. Linked list usually do not have the problem of overflow. Discuss. 

           Linked list is a dynamic data structure.It grows as when new data are added in the list and shrinks whenever new data is removed from the list.The memory allocation takesplace during the execution time just when new item inserted in the list.So linked list do not face over.

4. Write two advantages of linked list over arrays. 

         The principal benefit of a linked list over a conventional array is that the list elements can be easily inserted or removed without reallocation or reorganization of the entire structure because the data items need not be stored contiguously in memory or on disk, while restructuring an array at run-time is a much more .

5. Consider the following cases:

 (i) Paper cups are arranged on a dining table one above the other.

 (ii) Many people are waiting in a row to tickets for a cinema. Identify and compare the data structures that you know in connection with the above mentioned contexts. 

6. Queue follows the _______ principle. 

    Ans. FIFO

7. How does stack overflow and underflow occur? 

        Once the stack is full and if we attempt to insert an item, an impossible situation arises, known as stack overflow. Pop Operation is the process of deleting an element from the top of a stack. If we try to delete an item from an empty stack, an unfavorable situation arises, known as stack underflow.

 8. Write a procedure to implement traversal operation in a linked list. 

          Step 1: Get the address of the first node from START and store it in Temp.

        Step 2: Using the address in Temp, get the data of the first node and store in Val. 

        Step 3: Also get the content of the link part of this node (i.e., the address of the next node) and store it in Temp.

  Step 4: If the content of Temp is not NULL, go to step 2; 

    otherwise stop

 9. Name the data structure that follows LIFO principle.

 (a) stack (b) queue (c) array (d) linked list 

      Ans. a

 10. Write an algorithm to perform insertion operation in a Queue. 


          Algorithm for Insertion: 

Assume that Q[N] is an array of queue with size N and FRONT and REAR denote the front and rear positions of the queue.
 Let VAL contains the data to be added into the queue.

      Start

  1: If (REAR == -1) Then //Empty status checking

          2: FRONT = REAR = 0 

          3: Q[REAR] = VAL 

          4: Else If (REAR < N-1) Then //Space availability checking

          5: REAR = REAR + 1

         6: Q[REAR] = VAL 

         7: Else 

         8: Print "Queue Overflow "

         9: End of If

            Stop 


11. Name the data structure where memory  allocation is done only at the time of  execution.

      Ans. Dynamic data structure.

12. Write an algorithm to add a new item in to the stack?

            Assume that STACK[N] is an array of stack with size N and TOS denotes the top position of the stack. Let VAL contains the data to be added into the stack. 

       Start

1: If (TOS < N-1) Then //Space availability checking (Overflow)

        2: TOS = TOS + 1 

      3: STACK[TOS] = VAL 

        4: Else 

       5: Print "Stack Overflow "

       6: End of If

         Stop



                                                                                                                                                                                                



+2].2-Concepts of Object Oriented Programming - Previous Questions Chapter wise


                           PLUS TWO  COMPUTER SCIENCE

 Second Year Computer Science Previous Questions Chapter wise ..

Chapter 2.Concepts of Object Oriented Programming




       1. Compare static and dynamic polymorphism.

       There are two types of polymorphism

a. Compile time(early binding/static) polymorphism:

                   The ability of a compiler to relate or bind a function call with the function definition during compilation itself.

   These are two type.Function overloading and operator overloading

Function overloading: Multiple function with same name and different function signatures is known as function overlaoding.

Operator overloading: Ordinary Operator exhibit  different  behaviors on different object of a class depending on the types of operands it receives.

2. Run time(Late binding/dynamic:

      Run time (Dynamic) polymorphism (or late binding): Polymorphism during run-time. It uses pointers. Virtual functions are examples.

       2. A program is implemented to find the area of a circle and areas of rectangle with two           functions        having same name but with different signature.
 (a) Name the concept.
 (b) Explain this concept by writing the above program.

  3. Differentiate between data abstraction and data encapsulation.

            Refers to showing only  the essential features of the application  and  hiding  the details from outside world.Data abstraction separates interface and separates  interface and implementation.Implementation denotes how variables are declared,how functions are coded etc.It is through an interface a communiaction send to the object as messages.

       Data encapsulation: It binds the data and functions together and keeps them safe.C++ implements encapsulation through  a declaration of a class.A class contain Public,Private and Protected members.

 4. What is the difference between structure and class?

      Structure:  1. Contains only data as members.
                       2. No access specifiers are used.
                       3. By default, the members are public

     Class:       1. Contains data and functions as members.
                     2. Access specifiers private, public and protected are used for members.
                     3. By default, the members are private.


5. Default access specifier is (a) private (b) public (c) protected (d) none

Ans. b

6. Showing only the essential features and hiding complexities from outside world is refers to ----------
Ans. Data abstraction

7. What is the object oriented programming paradigm?give any two advantages.

   Ans.  

Object-oriented programming (OOP) is a programming paradigm based upon objects (having both data and methods) that aims to incorporate the advantages of modularity and reusability.

Improved software-development productivity: Object-oriented programming is modular, as it provides separation of duties in object-based program development. It is also extensible, as objects can be extended to include new attributes and behaviors.