CBSE Previous Year Solved Papers Class 12 Computer Science Outside Delhi 2013
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 benefit of using default parameter/argument in a function? Give a suitable example to illustrate it using C++ code
Answer : The benefits of using default parameter/argument in a function are as following:
- They can be used to add new parameters to existing function.
- They can be used to combine similar function into one.
(b) Observe the following C++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C++ compiler:
(c) Observe the following C++ code carefully and rewrite the same after removing all the syntax error(s) present in the code. Ensure that you underline each correction in the code.
• All the desired header files are already included, which are required to run the code.
• Correction should not change the logic of the program.
(d) Observe the following C++ code carefully and obtain the output, which will appear on the screen after execution of it.
• All the desired header files are already included in the code, which are required to run the code.
(e) Observe the following C++ code carefully and obtain the output, which will appear on the screen after execution of it.
(f) Based on the following C++ code find out the expected correct output(s) from the option (i) to (iv). Also, find out the minimum and the maximum value that can be assigned to the variable Guess used in the code at the time when value of Turn is 3.
Question.2. (a) Write any two similarities between Constructor and
Destructor. Write the (unction headers for constructor and destructor of a class Flight.
(i) Constructors and destructor’s do not have any return type, not even void, nor can they return values.
(ii) References and pointers cannot be used on constructors and destructor’s because their addresses cannot be taken.
(b) Answer the questions (i) and (ii) alter going through the following class:
(i) Out of the following, which of the option is correct for calling Function 2?
(ii) Option 1-Race T(30);
(iii) Option 2-Race U(R);
(iv) Name the feature of Object Oriented Programming, which illustrated by Function 1, Function 2 and Function 3 combined together.
(i) Option-1 Race T (30)
(ii) Constructor overloading.
(c) Define a class Bus. in C++ with the following specifications:
• Busno – to store Bus No
• From to store Place name of origin
• To — to store Place name of destination
• Type — to store Bus Type such as ‘O’ for ordinary
• Distance – to store the Distance in Kilometres
• Fare —to store the Bus Fare
• A constructor function to initialize Type as ‘O’ and Freight as 500 ’
• A function CalcFare() to calculate Fare as per the following criteria:
• A function Allocate)) to allow user to enter values for Busno, From, To, Type and Distance. Also, this function should call CalcFare() to calculate Fare.
• A function Show() to display the content of all the data members on screen.
(d) Consider the following C++ code and answer the questions from (i) to (iv):
(i) Which type of inheritance is shown in the above example?
(ii) Write the names of those data members, which can be directly accessed from the objects of class Result.
(iii) Write the names of those member functions which can be directly accessed from the objects of class Result.
(iv) Write names of those data members, which can be directly accessed from the Mentry () function of class Marks.
Question.3. (a) Write code for a function void Chang Over (inf P[ ],int N) in C++, which re-positions all the elements of the array by shifting each of them to the nest position and by shifting the last element to the first position.
(b) An array T is stored along the row in the memory with each element requiring 8 bytes of storage. If the base address of array T is 14000, find out the location of T[ 10] .
(c) Write a user defined function DispTen(int A[ ] , int N, int M) In C++ to find and display all the numbers, which are divisible by 10. For example if the content of array is:
The output should be 20 10 30
(d) Evaluate the following post fix expression. Show the status of stack after execution of each operation: 5, 2, *, 50, 5, /, 5,-,+
(e) Write a function Q DELETE() in C++ to perform delete operation on a Linked Queue, which contains Passenger no and Passenger name. Consider the following definition of node in the code.
Question.4. (a) Fill in the blanks marked as Statement 1 and Statement 2, in the program segment given below with appropriate functions for the required task.
(b) Write a function Count You Me() in C++ which reads the contents of a text file story.txt and counts the words You and Me (not case sensitive).
For example, if the file contains:
You are my best friend.
You and me make a good team.
The function should display the output as Count for You: 2 Count for Me: 1
(c) Assuming the class ANTIQUE as declared below, write a function in C++ to read the objects of ANTIQUE from binary file ANTIQUE.DAT and display those antique items, which are priced between 10000 and 15000.
Question.5. (a) Explain the concept of candidate keys with the help of an appropriate example.
Answer: A table may have more than one such attribute/ group of attribute that identifies a tuple uniquely, all such attribute(s) are known as Candidate Keys.
In the above table ID and Item both the attributes are unique in nature, so they are candidate key.
Write SQL queries for (b) to (g) and write the outputs for the SQL queries mentioned shown in (h1) to (h4) parts on the basis of tables PRODUCTS and SUPPLIERS.
(b) To display the details of all the products in ascending order of product names (i.e. P NAME).
Answer: select * from PRODUCTS order by P NAME;
(c) To display product name and price of all those products, * whose price is in the range of 10000 and 15000 (both value inclusive).
Answer: select P NAME,PRICE from PRODUCTS where PRICE>=10000 and PRICE<= 15000;
(d) To display the number of products, which are supplied supplier, i.e., the expected output should be:
Answer: select SUPCODE, count(SUPCODE) from PRODUCTS group by SUPCODE;
(e) To display the price, product name and quantity (i.e., qty) of those products which have quantity more than 100.
Answer: select PRICE, P NAME, QTY from PRODUCTS where QTY>100;
(f) To display the names of those suppliers, who are either from DELHI or from CHENNAI.
Answer: select S NAME from SUPPLIERS where
CITY=”DELHI” or CITY=”KOLKATA”;
(g) To display the name of the companies and the name of the products in descending order of company names.
Answer: select COMPANY, P NAME from PRODUCTS order by COMPANY desc;
(h) Obtain the outputs of the following SQL, queries based on the data given in tables PRODUCTS and SUPPLIERS above,
(h1) SELECT DISTINCT SUPCODE FROM PRODUCTS;
(h2) SELECT MAX(PRICE), MIN(PRICE) FROM PRODUCTS;
(h3) SELECT PRICE*QIY AMOUNT FROM PRODUCTS WHERE PID=104;
(h4) SELECT PNAME,SNAME FROM PRODUCTS P, SUPPLIERS S WHERE P.SUPCODE=S.SUPCODE AND QTY>100;
Question.6. (a) Verify the following using Boolean Laws X +-Z = X + X’.Z+Y.Z
(b) Obtain the Boolean Expression for the logic circuit shown below:
(c) Write the Sum of Product form of the function F(A, B, C) fur the following truth table representation of F.
(d) Obtain the minimal form for the following Boolean expression using Karnaugh map.
Question.7. (a) Write two advantages of using an optical fibre cable over an Ethernet cable to connect two service stations, which are 200 m away from each other.
Answer: Two using an optical fibre cable over an Ethernet cable are:
• Provides high speed.
• Electrical and Magnetic interference does not affect the transmission
(b) What is the different between HTTP and FTP?
(c) Rovenza Communication international (RCI) is an on line corporate training provider company for IT related courses. The company is setting up their new campus in Kolltata. You as a network expert have to study the physical locations of various blocks and the number of computers to be installed. In the planning phase, provider the best possible answer for the queries (i) to (iv) raised by them.
(i) Suggest the most appropriate block, where RCI should plan to install the server.
(ii) Suggest the most appropriate block to block cable layout to connect all three blocks for efficient communication.
(iii) Which type of network out of the following is formed by connecting the computers of these three blocks?
(iv) Which wireless channel out of the following should be opted by RCI to connect to students from all over the world?
(i) Faculty recording block is most appropriate block to install the server.
(d) Write two advantages of using open source software over proprietary software.
Answer : Two advantages of using open source software aver proprietary software are:-
- Open Source Software is software whose source code is available to customer and it can be modified and redistributed without any limitations whereas source code of proprietary Software is not available.
- Open Source Software may come free of cost or with a payment of normal charges whereas proprietary software is neither open nor freely available.
(e) Which of the following crime(s) does not come under cybercrime?
(i) Copying some important data from a computer without taking permission from the owner of the data.
(ii) Stealing keyboard and mouse from a shop.
(iii) Getting into unknown person’s social networking account and start messaging on his behalf.
Answer: (ii) Stealing keyboard and mouse from a shop.