CBSE Previous Year Solved Papers Class 12 Computer Science Outside Delhi 2011
Time allowed : 3 hours Maximum Marks: 70
General Instructions :
- There are a total of 26 questions and five sections in the question paper, All questions are compulsory.
- Section A contains question number 1 to 5, Very Short Answer type questions of one mark each.
- Section B contains question number 6 to 10, Short Answer type I questions of two marks each.
- Section C contains question number 11 to 22, Short Answer type II questions of three marks each.
- Section D contains question number 23, Value Based Question of four marks.
- Section E contains question number 24 to 26, Long Answer type questions of five marks each.
- 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 Type Casting and Automatic Type Conversion ? Also, give suitable C++ code to illustrate both.
Type Casting : It is an user defined explicit type conversion which operand in an expression is forced to be a specific data type.
Automatic Type Conversion : In case of an expression in which operands of different type are mixed, an implicit type conversion is performed by the computer which automatically converts all operand upto the type of largest operand.
(b) Write the names of the header files, whichis/are essentially required to run/execute the following C++ code:
Answer: #include<iostream.h> and #include<ctype.h>
(c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction.
(d) Find the output of the following program :
(e) Find the output of the following program:
(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 MyNum.
Question.2. (a) Differentiate between Constructor and Destructor function with respect to Object Oriented Programming.
(b) Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used in the following prQgram jointly illustrated by the functions [I]to[IV].
(c) Define a class Applicant in C++ with following description:
- A data member ANo (Admission Number) of type long
- A data member Name of type string
- A data member Agg (Aggregate Marks) of type float
- A data member Grade of type char
- A member function GradeMe( ) to find the Grade as per the Aggregate Marks obtained by a student. Equivalent Aggregate Marks range and the respective Grades are shown as follows:
- A function ENTER( ) to allow user to enter values for ANo, Name, Agg & call function GradeMeO to find the Grade.
- A function Result( ) to allow user to view the content of all the data members.
(d) Answer the question (i) to (iv) based on the following:
- Write the names of member functions, which are accessible from objects of class course.
- Write the names of all the data members, which is /are accessible from member function commence of class course.
- Write the names of all the members, which are accessible from objects of class teacher.
- Which type of inheritance is illustrated in the above C++ code?
- Result( ), Student( ), Enroll ( ), Display( ), TCode, TName, Salary
- Data member from Students, Private Members from Teacher
- TCode, TName, Salary
- Multiple Inheritance
Question.3.(a) Write a Get2Froml() function in C++ to transfer the content from one array ALL[ ] to two different arrays Odd[ ] and Even[ ]. The Odd[ ] array shotdd contain the values from odd position (1, 3, 5,….) of ALL[ ] and Even[ ] array should contain the value from even positions (0, 2, 4, ….) ofALL.
(b) An array G  is stored in the memory along the row with each of its element occupying 8 bytes, find out the location of G , if G  is stored at 4200.
(c) Write a function in C++ to perform Delete operation on a dynamically allocated Queue containing Members details as given in the following definition of NODE.
(d) Write a DSUM () function in C++ to find sum of Diagonal Elements from NxN matrix.
(Assuming that the N is a odd number)
(e) Evaluate the following postfix notation of expression: True, False, NOT, AND, True, True, AND, OR
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 tellg( ) functions for performing the required task.
(b) Write a function in C++to count the no. of “He” or “She” words present in a text file “STORY.TXT”. If the file “STORY.TXT” content is as follows:
He is playing in the ground. She is playing with her dolls.
The output of the function should be
Count of He/She in file :
(c)Write a function in C++ to search for a laptop from a binary file “CAMERA.DAT” containing the objects of class CAMERA (as defined below). The user should enter the Model No and the function should search and display the details of the camera.
Question.5. (a) What do you understand by Selection and Projection operations in relational algebra ?
Answer : A selection is a unary operation written a σa (R) whereα is a propositional formula that consists of atoms as allowed in the normal selection and the logical operator ∩(and), ∪ (or) and (negation). The selection selects all those tuples in R for which α holds.
A projection a unary operation written as π a1,a2,……an (R) where a1,a2,……an is a set of attribute name. The result of such projection is defined as the set that is obtained when all the tuples in R are restricted to the set. Consider the following tables EMPLOYEE and SALGRADE and answer (b) and (c) parts of this question:
(b) Write SQL commands for the following statements:
(i) To display the details of all EMPLOYEES, descending order ofDOJ.
(ii)To display NAME and DESIG of those EMPLOYEES, whose SGRADE is either S02 or S03.
(iii)To display the content of all the EMPLOYEES table, whose DOJ is in between ‘09-FEB-2006’ and ‘08-AUG-2009’.
(iv)To add a new row with the following:
(v) 109, ‘Harish Roy’, ‘HEAD-LF, ‘S02’. ‘09-SEP-2007, ‘21- APR-1983’
(c) Give the output of the following SQL queries :
(i) SELECT COUNT (SGRADE), SGRADE FROM EMPLOYEE GROUP BY SGRADE;
(ii)SELECT MIN (DOB), MAX(DOJ) FROM EMPLOYEE;
(iii)SELECT Name, SALARY FROM EMPLOYEE E, SALGRAGE S WHERE E.SGRADE = S.SGRADE AND E.ECODE<103;
(iv) SELECT SGRADE, SALARY+HRA FROM SALGRADE WHERE SGARDE =‘S02’;
Question.6.(a) Verify the following using Truth Table
X+Y.Z= (X+Y). (X+Z)
(b) ’Write the equivalent Boolean Expression for the following – Logic Circuit.
Answer:F(P, Q, R)=P.Q+P.R
(c) Write the SOP form of a Boolean function F, which is represented in a truth table as follows:
(d) Reduce the following Boolean Expression using K-Map: F(A, B, C, D) = ∑ (0, 1, 2, 4, 5, 6, 8, 10)
Question.7.(a) In networking what is WAN? How is it different from LAN?
A Wide Area Network (WAN) is a network that covers a broad area (i.e., any telecommunications network that links across metropolitan, regional, national or international boundaries) using leased telecommunication lines.
LAN is completely different from WAN. LAN is only limited for connecting systems within the same building, whereas, WAN is extended for connection between countries, cities, etc.
(b) Differentiate between XML and HTML.
(c) What is WEB2.0 ?
Answer : WEB2.0 is associated with web applications that facilitates participatory information sharing, interoperability, user centered design and collaboration on the World Web Wide. It allows user to interact and collaborate with each other in a Social Media dialogue as creators of user generates
content in a virtual community.
(d) Out of the following, identify client side script(s) and server side script(s)
(d) JSP Answer:
(e) Great Studies University is setting up its Academic schools at Sunder Nagar and planning to set up a network. The university has 3 academic schools and one administration center as shown in the diagram below:
Number of Computers in each of the School / Center is follows :
- Suggest the most suitable place (i.e. Schools / Center) to install the server of this university with a suitable reason.
- Suggest an ideal layout for connecting these schools/ center for a wired connectivity.
- Which device you will suggest to be placed/ installed in each of these schools / center to efficiently connect all the computers with in these schools / center.
- The university is planning to connect its admission office in the closest big city, which is more than 350km from the university. WTiich type of network out of LAN, MAN or WAN will be formed? Justify your answer.
- Admin Center is suitable to install server because it has the maximum number of computers.
- WAN because given distance is more than the range of LAN and MAN.
(f)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.
(g) What are cookies?
Answer : Cookies are a small piece of data sent from a website and stored in a user’s web browser while the user is browsing that website.