CBSE Previous Year Solved  Papers  Class 12 Computer Science Delhi 2011

Time allowed : 3 hours                                                                                           Maximum Marks: 70

General Instructions :

  1.  There are a total of 26 questions and five sections in the question paper, All questions are compulsory.
  2. Section A contains question number 1 to 5, Very Short Answer type questions of one mark each.
  3.  Section B contains question number 6 to 10, Short Answer type I questions of two marks each.
  4.  Section C contains question number 11 to 22, Short Answer type II questions of three marks each.
  5.  Section D contains question number 23, Value Based Question of four marks.
  6. Section E contains question number 24 to 26, Long Answer type questions of five marks each.
  7. There is no overall choice in the question paper, however, an internal choice is provided in one question of two marks, one question of three marks and all three questions of five marks. An examined is to attempt any one of the questions out of two given in the question paper with the same question number.

Question.1. (a) What is the difference between Local Variable and Global Variable ? Also, give suitable C++ code to illustrate both.
Answer:
Local Variables : Local variables are those variables which are declared within a function or a compound statement and these variables can only be used within that function/scope. Global Variables : Global variables are those variables which are not declared within any function or scope. So, these variables can be accessed by any function of the program.
Example:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-1
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-2
(b) Write the names of the header files, which is/are essentially required to run/execute the following C++ code:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-3
Answer : #include<iostream.h> and #include<ctype.h>
(c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-4
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-5
(d) Find the output of the following program :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-6
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-7
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-47
(e) Find the output of the following program:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-8
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-9
(f) Go through the C++ code shown below, and find out the possible output or output from the suggested output options (i) to (iv). Also, write the least value and highest value, which can be assigned to the variable guess,
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-10
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-11

Question.2. (a) Differentiate between members, which are present within the private visibility mode with those which are present within the public visibility modes. 
Answer:
Private members of a class are accessible only to the member functions of the same class.
Public members of a class are accessible to the member functions of the same class, member functions of its derived classes and also to an object of the” class.
Example:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-12
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-13
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-14
(b) Write the output of the following C++ code. Also, write the name of. feature of Object Oriented Programming used in the following program jointly illustrated by the functions [I] to [IV].
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-15
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-16
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-17
(c) Define a class candidate in C++ with following Description:
Private Members

  •  A data member RNo (Registration Number) of type long
  •  A data member Name of type string
  •  A data member Score of type float
  • A data member Remark of type string
  •  A member function AssignRem( ) to assign Remarks as per the Score obtained by a candidate. Score range and the respective Remarks are shown as follows:
    cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-18

Public members

  •  A function ENTER/) to allow user to enter values for RNo, Name, Score & call function AssignRemO to assign the remarks.
  • A function DISPLAY/) to allow user to view the content
    of all the data members.

Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-19
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-20
(d)Answer the question (i) to (iv) based on the following:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-21
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-22

  1.  Which type of inheritance is illustrated in the above C++ code?
  2. Write the names of all the data members, which is / are accessible from member function Commence of class Course.
  3. Write the names of member functions, which are accessible from objects of class Course.
  4. Write the names of all the members, which are accessible from objects of class faculty.

Answer:

  1. Multiple Inheritance
  2. CCode, CourseName,’ StartDate, EndDate, Pay
  3. Commence( ), CDetail( ), Register( ), Display!)
  4. Enter( )> Show( )

Question.3.(a) Write a GetlFrom2( ) function in C++ to transfer the content from two arrays FIRST[ ] and SECOND[ ] to array ALL[ ]. The even places (0, 2,4,…) of array ALL[ ] should get the content from the array FIRST [ ] and odd places (1,3,5,…) of the array ALL [ ] should get the content from the array SECOND[ ]
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-23
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-24
(b) An array P[20] [50] is stored in the memory along the column with each of its element occupying 4 bytes, find out the location of P[15] [10], if P[0] [0] is stored at 5200.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-25
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-26
(c) Write a function in C++ to Perform insert operation on a dynamically allocated Queue containing Passenger details as given in the following definition of NODE.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-27
(d) Write a COLSUM ( ) functionin C++ to find sum of each column of each column of a NxM matrix.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-28
(e) Evaluate the following postfix notation of expression: 50, 60, +,20, 10, -, *
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-29

Question.4. (a) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekg( ), seekp( ), tellp() and tellgO functions for performing the required task.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-30
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-31
(b) Write a function in C++ to count the no. of “Me” or “IVfy” words present in a text file “DIARY.TXT”.
If the file “DIARY.TXT” content is as follows :
My first book was Me and My family. It gave me chance to be known to the world.
The output of the function should be Count of Me/My in file : 4
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-32
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-33
(c) Write a function in C++ to search for a laptop from a binary file “LAPTOP.DAT” containing the objects of class LAPTOP (as defined below). The user should enter the Model No and the function should search and display the details of the laptop.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-34
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-35

Question.5.(a) What do you understand by Union & Cartesian Product operations in relational algebra?
Answer: The union of two relations is a relation that includes all the tuples that are either in R or S or in both R and S. The Cartesian Product combines the tuples of one relation with all the tuples of the realtion.
Consider the following tables WORKER and PAYLEVEL and answer (b) and-(c) parts of this question:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-36
(b) Write SQL commands for the following statements:

  1.  To display the details of all WORKERS, descending order of DOB.
  2. To display NAME and DESIG of those WORKERs whose PLEVEL is either P001 or P002.
  3. To display the content of all the WORKERs table, whose DOB is in between ‘19-JAN-1984’ and ‘18-JAN-1987’.
  4. To add a new row with the following :
  5.  19′,‘Days Kishore’, ‘Operator’, ‘P003’. ‘19-Jun-2008’, ‘11- Jul-1984’

Answer:

  1. select from WORKER order by DOB desc;
  2. select NAME, DESIG from WORKER where PLEVEL in (‘POO1′, ‘P002’) ;
  3. select * from WORKER where DOB between ‘ 19-JAN- 1984’ and ‘18-JAN-1987’;
  4.  insert into WORKER values (19, ‘Daya Kishore’, ‘Operator’, ‘P003’ , T l-Jun-1984’);

(c) Give the output of the following SQL queries :
(I) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER ’ GROUP BY PLEVEL;
(II) SELECT MAX(DOB), MIN(DOJ) FROM WORKER?
(III) SELECT name, pay fROM WORKER W, PAYLEVEL P WHERE W.PLEVEL = S.PLEVEL AND P.ECODE<13;
(IV) SELECT PLEVEL, PAY+ALLOWANCE FROM PAYLEVEL WHERE PLEVEL = ‘P003’;
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-37
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-38

Question.6.(a) Verify the following using Truth Table
U(U +V) = (U+V)
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-39
(b) Write the equivalent Boolean Expression for the following Logic Circuit.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-40
(c) Write the POS form of a Boolean function F, which is represented in a truth table as follows :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-41
Answer:
F(A,B,C) = (A+B+C).(A+B’+C’).(A’+B+C’).(A’+B’+C)
(d) Reduce the following Boolean Expression using K-Map:
F(P> a S) = ∑ (0,1, 2,4, 5, 6, 8,12)
Answer.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-42

Question.7. (a) Differentiate between packet switching and message switching technique in network communication.
Answer:
Packet switching : In packet switching, a fixed size of data ‘ packet that can be transmitted across the network is specified and then the data packets are sent through switching stations to the final destination. All the packets are stored in the main memory instead of disk. As a result accessing time of packets is reduced. Message switching : The source computer sends data (message) to the switching station, which stores data in a buffer. It then looks for a free link to another switching station and sends data to that station. This process continues until data is delivered to the destination computer. This type of switching technique is also known as “store and forward” switching.
(b) Differentiate between BUS and STAR topology of networks.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-43
(c) What is VoIP?
Answer: Voice over Internet Protocol (Voice over IP, VoIP) is communication protocols and transmission technologies for delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. Also, we can say, VoIP are IP telephony, Internet telephony and broadband telephony.
(d) Out of the following, identify client side script(s) and server side script(s).

  1.  ASP
  2. JavaScript
  3. VBscript
  4. JSP

Answer:
JavaScript & VB script are client side scripts.
JSP & ASP are server side scripts.
(e) Quick Learn University is setting up its Academic blocks at Prayag Nagar and planning to set up a network. The university has 3 academic blocks and one Human Resource Center as shown in the diagram below:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-44
Center to center distances between various block/center is as follows :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-45

  1. Suggest the most suitable place (i.e. Block / Center) to install the server of this university with a suitable reason.
  2.  Suggest an ideal layout for connecting these blocks/center for a wired connectivity.
  3. Which device you will suggest to be placed/ installed in each of these blocks/center to efficiently connect all the computers with in these blocks / center.
  4. The university is planning to connect its admission office in the closest big city, which is more than 250km from university, which type of network out of LAN, MAN or WAN will be formed? Justify your answer.

Answer:

  1.  HR center is suitable to install server because it has the maximum number of computers.
  2. cbse-previous-year-solved-papers-class-12-computer-science-delhi-2011-46
  3.  Switch
  4.  WAN because given distance is more than the range of LAN and MAN.

(f) Which of the following will come under Cyber Crime?

  1. Theft of a brand new sealed pack laptop
  2. Access to a bank account for getting unauthorized Money Transaction
  3. Modification in a company data with unauthorized access
  4. Photocopying a printed report

Answer:

  1.  Access to a bank account for getting unauthorized Money Transaction
  2. Modification in a company data with unauthorized access

(g) Compare open source software and proprietary software.
Answer: Open source software refers to a program or software in which the source code (the form of the program when a programmer writes a program in a particular programming ‘ language) is available to the general public for use and/or modification from its original design free of charge.
Proprietary software is software that is owned by an individual or a company (usually the one that developed it). There are ‘ almost always major restrictions on its use, and its source code is almost always kept secret.