Download, print and study this document offline |
Page 1 Page No. 1 SAMPLE QUESTION PAPER Subject: Computer Science Class: XII (2017-18) Time: 3 Hrs. M.M.:70 Instructions: (a) All questions are compulsory, (b) Answer either Section A or Section B: (i) Section A - Programming Language with C++ (ii) Section B - Programming Language with Python (c) Section C is compulsory. SECTION – A (C++) Q. No. Part Question Description Marks Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable example otherwise give reason. 2 (b) Raman suggests Kishan the following header files which are required to be included in the given C++ program. Identify the header files which are wrongly suggested by Raman. Program: Suggested header files:- 1. iostream.h 2. stdio.h 3. conio.h 4. ctype.h 1 (c) Rewrite the following program after removing the syntactical errors (is any). Underline each correction. 2 Page 2 Page No. 1 SAMPLE QUESTION PAPER Subject: Computer Science Class: XII (2017-18) Time: 3 Hrs. M.M.:70 Instructions: (a) All questions are compulsory, (b) Answer either Section A or Section B: (i) Section A - Programming Language with C++ (ii) Section B - Programming Language with Python (c) Section C is compulsory. SECTION – A (C++) Q. No. Part Question Description Marks Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable example otherwise give reason. 2 (b) Raman suggests Kishan the following header files which are required to be included in the given C++ program. Identify the header files which are wrongly suggested by Raman. Program: Suggested header files:- 1. iostream.h 2. stdio.h 3. conio.h 4. ctype.h 1 (c) Rewrite the following program after removing the syntactical errors (is any). Underline each correction. 2 Page No. 2 (d) Write the output of the following C++ program code(assume all necessary header files are included in program): 2 (e) Write the output of the following C++ program code(assume all necessary header files are included in program): 3 Page 3 Page No. 1 SAMPLE QUESTION PAPER Subject: Computer Science Class: XII (2017-18) Time: 3 Hrs. M.M.:70 Instructions: (a) All questions are compulsory, (b) Answer either Section A or Section B: (i) Section A - Programming Language with C++ (ii) Section B - Programming Language with Python (c) Section C is compulsory. SECTION – A (C++) Q. No. Part Question Description Marks Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable example otherwise give reason. 2 (b) Raman suggests Kishan the following header files which are required to be included in the given C++ program. Identify the header files which are wrongly suggested by Raman. Program: Suggested header files:- 1. iostream.h 2. stdio.h 3. conio.h 4. ctype.h 1 (c) Rewrite the following program after removing the syntactical errors (is any). Underline each correction. 2 Page No. 2 (d) Write the output of the following C++ program code(assume all necessary header files are included in program): 2 (e) Write the output of the following C++ program code(assume all necessary header files are included in program): 3 Page No. 3 (f) Consider the following C++ program code and choose the option(s) which are not possible as output. Also, print the minimum & maximum value of variable Pick during complete execution of the program.(assume all necessary header files are included in program): (a) 5:6:6:6: (b) 4:7:5:3: (c) 8:6:1:2: (d) 7:5:3:1 2 Q2. (a) What do you mean by Data Abstraction in OOPs? Explain its significance in programming with a suitable example. 2 (b) Answer the question (i) & (ii) after going through the following code. (assume all necessary header files are included in program):- 2 Page 4 Page No. 1 SAMPLE QUESTION PAPER Subject: Computer Science Class: XII (2017-18) Time: 3 Hrs. M.M.:70 Instructions: (a) All questions are compulsory, (b) Answer either Section A or Section B: (i) Section A - Programming Language with C++ (ii) Section B - Programming Language with Python (c) Section C is compulsory. SECTION – A (C++) Q. No. Part Question Description Marks Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable example otherwise give reason. 2 (b) Raman suggests Kishan the following header files which are required to be included in the given C++ program. Identify the header files which are wrongly suggested by Raman. Program: Suggested header files:- 1. iostream.h 2. stdio.h 3. conio.h 4. ctype.h 1 (c) Rewrite the following program after removing the syntactical errors (is any). Underline each correction. 2 Page No. 2 (d) Write the output of the following C++ program code(assume all necessary header files are included in program): 2 (e) Write the output of the following C++ program code(assume all necessary header files are included in program): 3 Page No. 3 (f) Consider the following C++ program code and choose the option(s) which are not possible as output. Also, print the minimum & maximum value of variable Pick during complete execution of the program.(assume all necessary header files are included in program): (a) 5:6:6:6: (b) 4:7:5:3: (c) 8:6:1:2: (d) 7:5:3:1 2 Q2. (a) What do you mean by Data Abstraction in OOPs? Explain its significance in programming with a suitable example. 2 (b) Answer the question (i) & (ii) after going through the following code. (assume all necessary header files are included in program):- 2 Page No. 4 (i) Give the name of the feature of OOP which is implemented by Function 1 & 2 together in the above class Game. (ii) Anuj made changes to the above class Game and made Function 3 private. Will he be able to execute the Line 1 successfully given below? Justify. void main() { Game ABC; //Line 1 } (c) Define a class Bill in OOP with the following specification:- Private members: 1. Bill_no - type long(bill number) 2. Bill_period - type integer(number of months) 3. No_of_calls - type integer(number of mobile calls) 4. Payment_mode - type string(“online” or “offline”) 5. Amount - type float(amount of bill) 6. Calculate_Bill() function to calculate the amount of bill given as per the following conditions: No_of_calls Calculation Rate/call (in rupees) <=500 1.0 501-1200 2.0 >1200 4.0 4 Page 5 Page No. 1 SAMPLE QUESTION PAPER Subject: Computer Science Class: XII (2017-18) Time: 3 Hrs. M.M.:70 Instructions: (a) All questions are compulsory, (b) Answer either Section A or Section B: (i) Section A - Programming Language with C++ (ii) Section B - Programming Language with Python (c) Section C is compulsory. SECTION – A (C++) Q. No. Part Question Description Marks Q1. (a) What is the role of a parameter/argument passed in a function? Can a default value be assigned to a parameter(Yes/No)? If yes, justify your answer with the help of a suitable example otherwise give reason. 2 (b) Raman suggests Kishan the following header files which are required to be included in the given C++ program. Identify the header files which are wrongly suggested by Raman. Program: Suggested header files:- 1. iostream.h 2. stdio.h 3. conio.h 4. ctype.h 1 (c) Rewrite the following program after removing the syntactical errors (is any). Underline each correction. 2 Page No. 2 (d) Write the output of the following C++ program code(assume all necessary header files are included in program): 2 (e) Write the output of the following C++ program code(assume all necessary header files are included in program): 3 Page No. 3 (f) Consider the following C++ program code and choose the option(s) which are not possible as output. Also, print the minimum & maximum value of variable Pick during complete execution of the program.(assume all necessary header files are included in program): (a) 5:6:6:6: (b) 4:7:5:3: (c) 8:6:1:2: (d) 7:5:3:1 2 Q2. (a) What do you mean by Data Abstraction in OOPs? Explain its significance in programming with a suitable example. 2 (b) Answer the question (i) & (ii) after going through the following code. (assume all necessary header files are included in program):- 2 Page No. 4 (i) Give the name of the feature of OOP which is implemented by Function 1 & 2 together in the above class Game. (ii) Anuj made changes to the above class Game and made Function 3 private. Will he be able to execute the Line 1 successfully given below? Justify. void main() { Game ABC; //Line 1 } (c) Define a class Bill in OOP with the following specification:- Private members: 1. Bill_no - type long(bill number) 2. Bill_period - type integer(number of months) 3. No_of_calls - type integer(number of mobile calls) 4. Payment_mode - type string(“online” or “offline”) 5. Amount - type float(amount of bill) 6. Calculate_Bill() function to calculate the amount of bill given as per the following conditions: No_of_calls Calculation Rate/call (in rupees) <=500 1.0 501-1200 2.0 >1200 4.0 4 Page No. 5 Also, the value of Amount should be reduced by 5% if Payment_mode is “online”. Public members: 1. A member function New_Bill() that will accept the values for Bill_no, Bill_period, No_of_calls, Payment_mode from the user and invoke Caluclate_Bill() to assign the value of Amount. 2. A member function Print_Bill() that will display all details of a Bill. (d) Answer the question from (i) to (iv) based on the given below code(assume all necessary header files are included in program):- (i) Write name of the class whose constructor is invoked first on the creation of a new object of class Country. (ii) Write name of the data members which are accessible through the object of class Country. 4Read More
1. What is the CBSE sample question paper for Computer Science? |
2. How can I access the CBSE sample question paper for Computer Science? |
3. What is the purpose of solving the CBSE sample question paper for Computer Science? |
4. Are the questions in the CBSE sample question paper for Computer Science the same as those in the actual exam? |
5. Can solving the CBSE sample question paper for Computer Science guarantee success in the exam? |
9 docs
|
|
Explore Courses for Class 12 exam
|