CBSE Sample Papers for Class 12 Computer Science 2020

CBSE Sample Papers for Class 12 Computer Science (C++) with solutions and marking scheme issued by CBSE. Updated NCERT Solutions and CBSE previous exams question papers and their 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

CBSE Sample Papers for Class 12 Computer Science

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.

Click Here: CBSE Sample Papers for Class 12 All Subjects

CBSE Sample Papers for Class 12 Computer Science 2016, 2017, 201, 2019 & 2020

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 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

  • 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++.
  • 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
  • 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;
    void ADDMEM();
    void REMOVEMEM();
  • Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.
    P + ( Q – R ) * S / T

  • 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, which is defined below:
    class TEACHERS
    int TID; char DEPT[20];
    void GET()
    void SHOW()
    char *RDEPT(){return DEPT;}
  • 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];
    void Enter();void Display();
    void main()
    fstream InFile;“BOOK.DAT”,ios::binary|ios::in);
    BOOK B;
    InFile.seekg(5*sizeof(B));*)&B, sizeof(B));
    cout<<“Book Number:”<<InFile.tellg()/sizeof(B) + 1;
    cout<<” of “<<InFile.tellg()/sizeof(B)<<end1;

Leave a Reply

Your email address will not be published. Required fields are marked *