CBSE Sample Papers for Class 12 Computer Science 2024-25 (C++) with solutions and marking scheme issued by CBSE for academic session along with Updated NCERT Solutions and CBSE previous exams question papers. Download previous years paper’s answer sheets of All India region, Foreign region and Delhi region set 1, set 2 and set 3 main and compartment exams with solutions. In case of any query, please ask your question.

CBSE Sample Papers for Class 12 Computer Science

Class:12
Subject:Computer Science (C++)
Contents:CBSE Sample Papers

CBSE Sample Papers for Class 12 C++

CBSE Sample Papers for Class 12 Computer Science 2020 (C++) with Previous years papers (10 years papers with solutions) with marking scheme all sets of Delhi and other regions with board marking scheme as per latest CBSE curriculum 2019-20. Download NCERT Books and Apps for offline use based on new CBSE Syllabus.

Download App for Class 12

Previous Years Papers with solutions

Important Questions from CBSE Board – 2018

1. Write the definition of a function SumEO(int VALUES[], int N) in C++, which should display the sum of even values and sum of odd values of the array separately. 2
Example : If the array VALUES contains
25 20 22 21 53
Then the functions should display the output as :
Sum of even values = 42 (i.e., 20+22)
Sum of odd values = 99 (i.e., 25+21+53)
2. Let us assume Data[20][15] is a two-dimensional array, which is stored in the memory along the row with each of its elements occupying 2 bytes. Find the address of the element Data[10][5], if the element Data[15][10] is stored at the memory location 15000.
3. A text file named MATTER.TXT contains some text, which needs to be displayed such that every next character is separated by a symbol ‘#’.
Write a function definition for HashDisplay() in C++ that would display the entire content of the file MATTER.TXT in the desired format. 3
Example :
If the file MATTER.TXT has the following content stored in it :
THE WORLD IS ROUND
The function HashDisplay() should display the following content :
T#H#E# #W#O#R#L#D# #I#S# #R#O#U#N#D#

Important Questions from CBSE Board – 2017

1. Differentiate between private and public members of a class in context of Object Oriented Programming. Also give a suitable example illustrating accessibility/non-accessibility of each using a class and an object in C++.
2. Write the definition of a class RING in C++ with following description:
Private Members
– RingNumber // data member of integer type
– Radius // data member of float type
– Area // data member of float type
– CalcArea() // Member function to calculate and assign // Area as 3.14 ∗ Radius∗Radius
Public Members
– GetArea() // A function to allow user to enter values of
// RingNumber and Radius. Also, this
// function should call CalcArea() to calculate
// Area
– ShowArea() // A function to display RingNumber, Radius
// and Area
3. Write the definition of a member function ADDMEM( ) for a class QUEUE in C++, to add a MEMBER in a dynamically allocated Queue of Members
considering the following code is already written as a part of the program.
struct Member
{
int MNO;
char MNAME[20];
Member *Next;
};
Class QUEUE
{
Member *Rear,*Front;
public:
QUEUE(){Rear=NULL;Front=NULL;}
void ADDMEM();
void REMOVEMEM();
~QUEUE();
};
4. Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
P + ( Q – R ) * S / T
5. Write a definition for function COUNTDEPT( ) in C++ to read each object of a binary file TEACHERS.DAT, find and display the total number of teachers in the department MATHS. Assume that the file TEACHERS.DAT is created with the help of objects of class TEACHERS.
6. Find the output of the following C++ code considering that the binary file BOOK.DAT exists on the hard disk with a data of 200 books.
class BOOK
{
int BID;char BName[20];
public:
void Enter();void Display();
};

Download NCERT Books and Offline Apps 2024-25 based on new CBSE Syllabus. Ask your doubts related to NIOS or CBSE Board and share your knowledge with your friends and other users through Discussion Forum.

Last Edited: December 26, 2023