CBSE Previous Year Solved  Papers  Class 12 Computer Science Delhi 2012

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) Differentiate between the formal and actual parameters. Also, give a suitable C++ code to illustrate both.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-1
(b) Which C++ header file(s) are essentially required to be
included to run/execute following C++ source code (Note : Do not include any header file, which is/are not required) :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-2
Answer : iostream.h and string.h
(c) Rewrite the following program after removing the syntactical error(s) (if any). Underline each correction.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-3
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-4
Answer :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-5
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-6
(d) Find the output of the following program :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-7
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-9
(e) Find the output of the following program :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-10
Answer :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-11
(f) Observe the following program and find out, which output (s) out of (i) to (iv) will not be expected from the program? What will be the minimum and the maximum value assigned to the variable Chance ?
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-12
(i) 9#6# (ii) 19#17# (iii) J9#16# (iv) 20#16
Answer:
(iii)19# 16#
Minimum Value : 16
Maximum Value : 20

Question.2.(a) What is the difference between the members in private visibility mode and the members in public visibility mode inside a class? Also, give a suitable C++ code to illustrate both.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-13
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-14
(b) Answer the question (i) and (ii) after going through the following class:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-15
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-16

  1. In Object Oriented Programming, what are Function 1 and Function 3 combined together referred as?
  2.  In Object Oriented Programming, which concept is illustrated by Function 4 ? When is this function called/ invoked ?

Answer:

  1.  Function 1 and Function 3 combined together referred as Constructor Overloading.
  2. Function 4 is called Destructor. Whenever an object goes out of scope Function 4 is called.

(c) Define a class SUPPLY in C++ with following description: 4 Private Members:

  •  Code of type int
  •  FoodName of type string
  •  Sticker of type string
  •  FoodType of type string
  •  A member function GetType( ) to assign the following values for FoodType as per the given Sticker:
    cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-17

Public Members:

  • A function FoodIn() to allow user to enter values for
    Code, FoodName, Sticker and call function GetType() to assign respective FoodType.
  • A function FoodOut]) to allow user to view the concept of all the data members.

Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-18
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-19
(d)Answer the questions (i) to (iv) based on the following:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-20
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-21
(i) Name the type of inheritance illustrated in the above C++ code.
(ii)Write the names of data members, which are accessible from member functions of class SHOWROOM.
(iii) Write the names of all the member functions, which are accessible from objects belonging to class WORKAREA.
(iv)Write the names of all the members, which are accessible from objects of class SHOWROOM.
Answer.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-22

Question.3.(a) Write a ftmction SWAP2CHANGE (int p[ ],int N) in C++ i to modify the content of the array in such a way that the elements, which are multiples of 10 swap with the value present in the very next position in the array.
For example: Let us take an array namely P.
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-23
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-24
(b) An array S[10][30] is stored in the memory along the column with each of the element occupying 2 bytes, find out the memory location of S[5][10], if an element S[2] [15] is stored at location 8200.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-25
(c) Write a function in C++ to perform insert operation in a Dynamic Queue containing DVD’s information (represented with the help of an array of structure DVD).
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-26
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-27
(d) Write a function SKIPEACH (int H[ ][3],int C, int R) in C++ to display all alternate elements from two-dimensional array H (starting from H[0] [0]).
For example:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-28
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-29
(e) Evaluate the following POSTFIX notation. Show status of Stack after every step of evaluation (i.e. after each operator) :
False, NOT, True, AND, True, False, OR, AND
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-30

Question.4(a) Observe the program segment given below carefully and the question that fallow:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-31
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-32
(i) Write statement 1 to position the file pointer to the appropriate place, so that the data updation is done for the required Article.
(ii) Write statement 2 to perform the write operation so that the updation is done in the binary file. Answer:
(i) File.Seekp(-l * sizeof(I), ios :: (ur));
(ii) File.Writte((char*) &I, sizeof(I));
(b) Write a function in C++ to read the content of a text file “PLACES.TXT” and display all those lines on screen, which are either starting with ‘P’ or starting with ‘S’.
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-33
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-34
(c) Write a function in C++ to search for the details (Number and Calls) of those Mobile phones, which have more than 1000 calls from a binary file “mobile.dat”. Assuming that this binary file contains records/objects of class Mobile, which is defined below:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-35
Answer: void Display
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-36

Question.5(a) Give a suitable example of a table with sample data and illustrate Primary and Candidate Keys in it.
Answer:
Primary Key— It’s a column or set of columns that helps in to identify records uniquely.
HERE, Adm.no., Roll no. both can identify records uniquely. So we can make Asmno as primary key.
Candidate Key—It’s a column or set of columns that can act as a primary key but is not selected as a primary key.
Since, we have created Adm.no. as Primary key, so Roll no. is the candidate key.
Consider the following tables CARHUB and CUSTOMER and answer (b) and (c) parts of question :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-37
(b) Write the SQL command for the following statements :

  1.  To display the names of all the white colored vehicles.
  2. To display the name of vehicle, make and capacity of vehicles in ascending order of their sitting capacity.
  3. To display the highest charges at which a vehicle can be hired from CABHUB.
  4. To display the customer name and the corresponding name of the vehicle hired by them.

Answer:

  1.  select VehicleName from CABHUB where Color = ‘WHITE’;
  2. select VehicleName, Make, Capacity from CABHUB order by Capacity;
  3. select MAX(Charges) from CABHUB;
  4. select CName, VehicleName from CABHUB CA,
    CUSTOMER CU where CA.VCode= CU.VCode;

(c) Give the output of the following SQL queries :
(I) SELECT COUNT (DISTINCT Make) FROM CABHUB;
(II)SELECT MAX(CHARGES), MIN (CHARGES) FROM CABHUB;
(III)SELECT COUNTCO, Make, FROM CABHUB;
(IV)SELECT VEHICLE FROM CABHUB WHERE CAPACITY=4;
Answer:
br-lazy"

Question.6.(a) Verify the following using truth table
br-lazy"
Answer.
br-lazy"
(b) Write the equivalent Boolean Expression for the following Logic Circuit:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-41
Answer:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-42
(c) Write POS form of Boolean function G, which is represented in a truth table as follows:
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-43
(d) Reduce the following Boolean Expression using K-Map: 3 F(P, Q, R, S) = £ (1, 2, 3, 4, 5, 6, 7, 8, 10)
Answer:
br-lazy"

Question.7(a) What out of the following, will you use to have an audio-visual chat with an expert sitting in a far-away place to fix¬up a technical issue?

  1.  Email
  2. VoIP
  3. FTP

Answer: VoIP
(b) Name one client side scripting language and one server side scripting language.
Answer : Server side script— ASP
Client side script— Javascript
(c) Which out of the following comes under Cyber Crime?

  1.  Stealing a Mouse from someone’s computer.
  2. Operating someone’s internet banking account, without his knowledge.
  3. Entering in someone’s computer remotely and copying data, without seeking his permission.

Answer :

  1.  Operating someone’s internet banking account, without his knowledge.
  2.  Entering in someone’s computer remotely and copying data, without seeking his permission.

(d) Write one advantage of Star Topology of network. Also, illustrate how 5 computers can be connected with each other using Star topology of network.
Answer : One advantage of Star Topology of network is that no disruption to the network while connecting or removing devices. 5 computers can be connected with each other using server.
br-lazy"
(e) Granuda Consultants are setting up a secured network for their office campus at Faridabad for their day-to-day office and web-based activities. They are planning to have connectivity between 3 buildings and the head office situated in Kolkata. Answer the questions (el) to (e4) after going through the building positions in the campus and other details, which are given below :
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-46
cbse-previous-year-solved-papers-class-12-computer-science-delhi-2012-47
(1) Suggest the most suitable place (i.e. building) to house the server of this organization. Also give a reason to justify your suggested location.
(2) Suggest a cable layout of connection between the buildings
inside the campus.
Suggest the placement of the following device with justification:
(i) Switch
(ii)Repeater
(3) The organization is planning to provide a high speed link with its head office situated in KOLKATTA using a wired connection. Which of the following cables will be most suitable for this job?
(i) Optical Fibre
(ii)Co-axial Cable
(iii)Ethernet
Cable
Answer:
(1) “JAMUNA” building is most suitable place to install the server because maximum number of computers are there.
(2)
br-lazy"
(3) (ii) Co-axial Cable
(f) Give one suitable example of each URL and Domain Name.
Answer:
URL—http://www. face b ook. co m / login.
Domain Name—www. facebook.eom
(g) Name two Open Source software along with its application.
Answer:
(i) XAMPP — a package of web applications including Apache and MySQL
(ii)Mozilla Thunderbird — cross-platform email, news, and chat client developed by the Mozilla Foundation.