CBSE Sample Question Papers for Class 12 Computer Science Old 2020 PDF Download

CBSE Sample Question Papers for Class 12 Computer Science Old 2020

Class XII
Computer Science – OLD (283)
Sample Question Paper 2019-20

Max. Marks: 70                                                                                                        Time: 3 hrs

General Instructions:

  1. All questions are compulsory.
  2. Programming Language with C+ +
  3. In Question 2(b, d) ,3 and 4 has internal choices.

Question 1.
(a) Write the type of C++ Operators (Arithmetic, Logical, and Relational Operators) from the following:     [2]
(i) !(ii) !=(iii) &&(iv) %

(b) Observe the following program very carefully and write the name of those header file(s), which are essentially needed to compile and execute the following program successfully:     [1]

void main()
{
char text[20], newText[20];
gets(text);
strcpy(newT ext,text);
for(int i=0;i<strlen(text);i++)
if(text[i] = =’A’)
text[i] = text[i]+2;
puts(text);
}

(c) Rewrite the following C++ code after removing any/all Syntactical Error(s) with each correction underlined.     [2]
Note: Assume all required header files are already being included in the program.

#define float PI 3.14 void main( )
{
float R=4.5,H=1.5;
A=2*PI*R*H + 2*PIpow(R,2);
cout<< ‘ Area= ’ <<A<<endl;
}

(d) Find and write the output of the following C++ program code:     [3]
Note: Assume all required header files are already being included in the program.

void main( )
{
int Ar[ ] = { 6,3 , 8 , 10,4,6,7} ;
int *Ptr = Ar , I ;
cout<<++*Ptr++ << ‘@’ ;
I = Ar[3] – Ar[2] ;
cout<<++*(Ptr+I)<<‘@'<<“\n” ;
cout<<++I + *Ptr++ << ‘@’ ;
cout<<*Ptr++ <<‘@'<< ‘\n’ ;
for( ; I >=0 ; I -=2)
cout<<Ar[I] << ‘@’ ;
}

(e) Find and write the output of the following C++ program code:      [2]
type def char STRING[80];
void MIXNOW(STRING S)
{
int Size=strlen(S);
for(int I=0;I<Size;I+=2)
{
char WS=S[I];
S[I]=S[I+1];
S[I+1]=WS;
}
for (I=1;I<Size;I+=2)
if (S[I]>=’M’ && S[I]<=’U’)
S[I]=’@’;
}
void main()
{
STRING Word=”CBSEEXAM2019”;
MIXNOW(Word);
cout<<W ord<<endl;
}

(f) Observe the following program and find out, which output(s) out of (i) to (iv) will be expected from the program? What will be the minimum and the maximum value assigned to the variable Alter?     [2]
Note: Assume all required header files are already being included in the program.

void main( )
{
randomize();
int Ar[]={10,7}, N;
int Alter=random(2) + 10 ;
for (int C=0;C<2;C++)
{
N=random(2) ;
cout<<Ar[N] +Alter<<”#”;
}
}
(i) 21#20#
(ii) 20#18#
(iii) 20#17#
(iv) 21#17#

CBSE Previous Year Question Papers for Class 10 and 12 Last 10 Years

Question 2.
(a) What is a copy constructor? Illustrate with a suitable C++ example.     [2]

(b) Write the output of the following C++ code. Also, write the name of feature of Object Oriented Programming used in the following program jointly illustrated by the Function 1 to Function 4.     [2]

void My_fun ( ) // Function 1
{
for (int I=1 ; I<=50 ; I++) cout<< “-” ;
cout<<end1 ;
}
void My_fun (int N) // Function 2
{
for (int I=1 ; I<=N ; I++) cout<<“*” ;
cout<<end1 ;
}
void My_fun (int A, int B) // Function 3
{
for (int I=1. ;I<=B ;I++) cout <<A*I ;
cout<<end1 ;
}
void My fun (char T, int N) // Function 4
{
for (int I=1 ; I<=N ; I++) cout<<T ;
cout<<end1;
}
void main ( )
{
int X=7, Y=4, Z=3;
char C=’#’ ;
My_fun (C,Y) ;
My_fun (X,Z) ;
}

OR

(b) Write any four differences between Constructor and Destructor function with respect to object oriented programming.

(c) Define a class Ele_Bill in C++ with the following descriptions:     [4]
Private members:
Cname                  of type character array
Pnumber               of type long
No_of_units           of type integer
Amount                 of type float.
Calc_Amount( )      This member function should calculate the amount as No_of_units*Cost .

Amount can be calculated according to the following conditions:
No of units Cost
First 50 units          Free
Next 100 units       0.80 @ unit
Next 200 units       1.00 @ unit
Remaining units    1.20 @ unit

Public members:
* A function Accept( ) which allows user to enter Cname, Pnumber, No_of_units and invoke function Calc_Amount().
* A function Display( ) to display the values of all the data members on the screen.

(d) Answer the questions (i) to (iv) based on the following:     [4]

class Faculty
{
int FCode;
protected:
char FName[20];
public:
Faculty();
void Enter();
void Show();
};
class Programme
{
int PID;
protected:
char Title[30];
public:
Programme();
void Commence();
void View();
};
class Schedule: public Programme, Faculty
{
int DD,MM,YYYY;
public:
Schedule();
void Start();
void View();
};
void main()
{
Schedule S; //Statement 1
__________   //Statement 2
}

(i) Write the names of all the member functions, which are directly accessible by the object S of class Schedule as declared in main() function.
(ii) Write the names of all the members, which are directly accessible by the memberfunction Start( ) of class Schedule.
(iii) Write Statement 2 to call function View( ) of class Programme from the object S of class Schedule.
(iv) What will be the order of execution of the constructors, when the object S of class Schedule is declared inside main()?

OR

(d) Consider the following class State :

class State
{
protected :
int tp;
public :
State( ) { tp=0;}
void inctp( ) { tp++;};
int gettp(); { return tp; }
};

Write a code in C++ to publically derive another class ‘District’ with the following additional members derived in the public visibility mode.

Data Members :
Dname             string
Distance           float
Population       long int

Member functions :
DINPUT( ) :        To enter Dname, Distance and population
DOUTPUT( ) :     To display the data members on the screen.

Question 3.
(a) Write a user-defined function AddEnd4(int A[][4],int R,int C) in C++ to find and display the sum of all the values, which are ending with 4 (i.e., unit place is 4).     [2]
For example if the content of array is:
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-1
The output should be 42
OR
Write a user defined function in C++ to find the sum of both left and right diagonal elements from a two dimensional array.

(b) Write a user-defined function EXTRA_ELE(int A[ ], int B[ ], int N) in C++ to find and display the extra element in Array A. Array A contains all the elements of array B but one more element extra. (Restriction: array elements are not in order)     [3]
Example: If the elements of Array A is 14, 21, 5, 19, 8, 4, 23, 1 1 and the elements of Array B is 23, 8, 19, 4, 14, 11, 5. Then output will be 21.
OR
Write a user defined function Reverse(int A[],int n) which accepts an integer array and its size as arguments (parameters) and reverse the array.
Example : if the array is 10,20,30,40,50 then reversed array is 50,40,30,20,10

(c) An array S[10] [30] is stored in the memory along the column with each of its element occupying 2 bytes. Find out the memory location of S[5][10], if element S[2][15] is stored at the location 8200.     [3]
OR
An array A[30][10] is stored in the memory with each element requiring 4 bytes of storage ,if the base address of A is 4500 ,Find out memory locations of A[12][8], if the content is stored along the row.

(d) Write the definition of a member function Ins_Player() for a class CQUEUE in C++, to add a Player in a statically allocated circular queue of PLAYERs considering the following code is already written as a part of the program:     [4]

struct Player
{
long Pid;
char Pname[20];
};
const int size=10;
class CQUEUE
{
Player Ar[size];
int Front, Rear;
public:
CQUEUE( )
{
Front = -1;
Rear = -1;
}
void Ins_Player(); // To add player in a static circular queue
void Del_Player(); // To remove player from a static circular queue
void Show Player(); // To display static circular queue
};

OR

(d) Write a function in C++ to delete a node containing Books information from a dynamically allocated stack of Books implemented with the help of the following structure:

struct Book
{
int BNo;
char BName[20];
Book *Next;
};

(e) Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.     [2]
A/B+C*(D-E)
OR
Evaluate the following Postfix expression : 4,10,5,+,*,15,3,/,-

Question 4.
(a) Write a function RevText() to read a text file “ Input.txt “ and Print only word starting with ‘I’ in reverse order.     [2]
Example:
If value in text file is: INDIA IS MY COUNTRY
Output will be: AIDNI SI MY COUNTRY
OR
Write a function in C++ to count the number of lowercase alphabets present in a text file “BOOK..txt”.

(b) Write a function in C++ to search and display details, whose destination is “Cochin” from binary file “Bus.Dat”. Assuming the binary file is containing the objects of the following class:     [3]

class BUS
{ int Bno; // Bus Number
char From[20]; // Bus Starting Point
char To[20]; // Bus Destination
public:
char * StartFrom ( ); { return From; }
char * EndTo( ); { return To; }
void input() { cin>>Bno>>; gets(From); get(To); }
void show( ) { cout<<Bno<< “:”<<From << “:” <<To<<endl; }
};

OR

(b) Write a function in C++ to add more new objects at the bottom of a binary file “STUDENT.dat”, assuming the binary file is containing the objects of the following class :

class STU
{
int Rno;
char Sname[20];
public: void Enter()
{
cin>>Rno;gets(Sname);
}
void show()
{
count << Rno<<sname<<endl;
}
};

(c) Find the output of the following C++ code considering that the binary file PRODUCT.DAT exists on the hard disk with a list of data of 500 products.     [1]

class PRODUCT
{
int PCode;char PName[20];
public:
void Entry();void Disp();
};
void main()
{
fstream In;
In.open(“PRODUCT.DAT”,ios: :binary|ios::in);
PRODUCT P;
In.seekg(0,ios::end);
cout<<“Total Count: “<<In.tellg()/sizeof(P)<<endl;
In.seekg(70*sizeof(P));
In.read((char*)&P, sizeof(P));
In.read((char*)&P, sizeof(P));
cout<<“At Product:”<<In.tellg()/sizeof(P) + 1;
In.close();
}

OR

(c) Which file stream is required for see kg() ?

Question 5.
(a) Observe the following table and answer the parts(i) and(ii) accordingly     [2]
Table:Product
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-2
(i) Write the names of most appropriate columns, which can be considered as candidate keys.
(ii) What is the degree and cardinality of the above table?

(b) Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables.   [4+2]
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-3
(i) Display the Trainer Name, City & Salary in descending order of their Hiredate.
(ii) To display the TNAME and CITY of Trainer who joined the Institute in the month of December 2001.
(iii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER and COURSE of all those courses whose FEES is less than or equal to 10000.
(iv) To display number of Trainers from each city.
(v) SELECT TID, TNAME, FROM TRAINER WHERE CITY NOT IN(‘DELHI’, ‘MUMBAI’);
(vi) SELECT DISTINCT TID FROM COURSE;
(vii) SELECT TID, COUNT(*), MIN(FEES) FROM COURSE GROUP BY TID HAVING COUNT(*)>1;
(viii) SELECT COUNT(*), SUM(FEES) FROM COURSE WHERE STARTDATE< ‘2018-09-15’;

Question 6.
(a) State any one Distributive Law of Boolean Algebra and Verify it using truth table.     [2]

(b) Draw the Logic Circuit of the following Boolean Expression:     [2]
((U + V’).(U + W)). (V + W’)

(c) Derive a Canonical SOP expression for a Boolean function F(X,Y,Z) represented by the following truth table:     [1]
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-4

(d) Reduce the following Boolean Expression to its simplest form using K-Map:     [3]
F(X,Y,Z,W)= Σ (0,1,2,3,4,5,8,10,11,14)

Question 7.
(a) Arun opened his e-mail and found that his inbox was full of hundreds of unwanted mails. It took him around two hours to delete these unwanted mails and find the relevant ones in his inbox. What may be the cause of his receiving so many unsolicited mails? What can Arun do to prevent this happening in future?     [2]

(b) Assume that 50 employees are working in an organization. Each employee has been allotted a separate workstation to work. In this way, all computers are connected through the server and all these workstations are distributed over two floors. In each floor, all the computers are connected to a switch. Identify the type of network?     [1]

(c) Your friend wishes to install a wireless network in his office. Explain him the difference between guided and unguided media.     [1]

(d) Write the expanded names for the following abbreviated terms used in Networking and Communications:     [2]
(i) CDMA
(ii) HTTP
(iii) XML
(iv) URL

(e) Multipurpose Public School, Bangluru is Setting up the network between its Different Wings of school campus. There are 4 wing named as SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H).     [4]
Multipurpose Public School, Bangluru
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-5
Distance between various wings are given below:
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-6
Number of Computers installed at various wings are as follows:
CBSE Sample Question Papers for Class 12 Computer Science Old 2020-7
(i) Suggest the best wired medium and draw the cable layout to efficiently connect various wings of Multipurpose PublicSchool, Bangluru.
(ii) Name the most suitable wing where the Server should be installed. Justify your answer.
(iii) Suggest a device/software and its placement that would provide data security for the entire network of the School.
(iv) Suggest a device and the protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of Multipurpose Public School, Bangluru.

CBSE Sample Papers for Class 12 with Marking Scheme and Solutions PDF Download for 2020 Exams

CBSE Class 12 Sample Papers are provided hereby Versionweekly for students to make them prepare for their final board exams. These sample papers are designed by our subject experts and as per the latest syllabus(2019-20). All the sample papers are prepared in PDF format, so that students can easily download them and practice offline as well. These sample papers are available here for Physics, Chemistry, Maths and Biology subjects.

SUBJECT SAMPLE QUESTION PAPER MARKING SCHEME
CBSE Sample Paper for Class 12 Accountancy SQP MS
CBSE Sample Paper for Class 12 Arabic SQP MS
CBSE Sample Paper for Class 12 Assamese SQP MS
CBSE Sample Paper for Class 12 Bengali SQP MS
CBSE Sample Paper for Class 12 Bhutia SQP MS
CBSE Sample Paper for Class 12 Biology SQP MS
CBSE Sample Paper for Class 12 Biotechnology SQP MS
CBSE Sample Paper for Class 12 Bodo SQP MS
CBSE Sample Paper for Class 12 Business Studies SQP MS
CBSE Sample Paper for Class 12 Carnatic Melodic SQP MS
CBSE Sample Paper for Class 12 Carnatic Percussion SQP MS
CBSE Sample Paper for Class 12 Carnatic Vocal SQP MS
CBSE Sample Paper for Class 12 Commercial Art SQP MS
CBSE Sample Paper for Class 12 Chemistry SQP MS
CBSE Sample Paper for Class 12 Computer Science – New SQP MS
CBSE Sample Paper for Class 12 Computer Science – Old SQP MS
CBSE Sample Paper for Class 12 Dance Manipuri SQP MS
CBSE Sample Paper for Class 12 Economics SQP MS
CBSE Sample Paper for Class 12 Engg. Graphic SQP MS
CBSE Sample Paper for Class 12 Entrepreneurship SQP MS
CBSE Sample Paper for Class 12 French SQP MS
CBSE Sample Paper for Class 12 Geography SQP MS
CBSE Sample Paper for Class 12 German SQP MS
CBSE Sample Paper for Class 12 Gujarati SQP MS
CBSE Sample Paper for Class 12 Hindi Aichhik SQP MS
CBSE Sample Paper for Class 12 Hindi Adhaar SQP MS
CBSE Sample Paper for Class 12 History SQP MS
CBSE Sample Paper for Class 12 Hindustani Music (Melodic) SQP MS
CBSE Sample Paper for Class 12 Hindustani Music (Percussion) SQP MS
CBSE Sample Paper for Class 12 Hindustani Music (Vocal) SQP MS
CBSE Sample Paper for Class 12 Home Science SQP MS
CBSE Sample Paper for Class 12 Informatics Practices – New SQP MS
CBSE Sample Paper for Class 12 Informatics Practices – Old SQP MS
CBSE Sample Paper for Class 12 Japanese SQP MS
CBSE Sample Paper for Class 12 Kannada SQP MS
CBSE Sample Paper for Class 12 Kashmiri SQP MS
CBSE Sample Paper for Class 12 Legal Studies SQP MS
CBSE Sample Paper for Class 12 Lepcha SQP MS
CBSE Sample Paper for Class 12 Limboo SQP MS
CBSE Sample Paper for Class 12 Malayalam SQP MS
CBSE Sample Paper for Class 12 Marathi SQP MS
CBSE Sample Paper for Class 12 Mathematics SQP MS
CBSE Sample Paper for Class 12 Mizo SQP MS
CBSE Sample Paper for Class 12 Manipuri SQP MS
CBSE Sample Paper for Class 12 NCC SQP MS
CBSE Sample Paper for Class 12 Nepali SQP MS
CBSE Sample Paper for Class 12 Odia SQP MS
CBSE Sample Paper for Class 12 Painting SQP MS
CBSE Sample Paper for Class 12 Graphic SQP MS
CBSE Sample Paper for Class 12 Sculpture SQP MS
CBSE Sample Paper for Class 12 Persian SQP MS
CBSE Sample Paper for Class 12 Physical Education SQP MS
CBSE Sample Paper for Class 12 Physics SQP MS
CBSE Sample Paper for Class 12 Pol. Science SQP MS
CBSE Sample Paper for Class 12 Psychology SQP MS
CBSE Sample Paper for Class 12 Punjabi SQP MS
CBSE Sample Paper for Class 12 Russian SQP MS
CBSE Sample Paper for Class 12 Sindhi SQP MS
CBSE Sample Paper for Class 12 Sociology SQP MS
CBSE Sample Paper for Class 12 Spanish SQP MS
CBSE Sample Paper for Class 12 English Core SQP MS
CBSE Sample Paper for Class 12 English Elective SQP MS
CBSE Sample Paper for Class 12 Sanskrit Core SQP MS
CBSE Sample Paper for Class 12 Sanskrit Elective SQP MS
CBSE Sample Paper for Class 12 Tamil SQP MS
CBSE Sample Paper for Class 12 Tangkhul SQP MS
CBSE Sample Paper for Class 12 Telangana Telugu SQP MS
CBSE Sample Paper for Class 12 Telugu SQP MS
CBSE Sample Paper for Class 12 Tibetan SQP MS
CBSE Sample Paper for Class 12 Urdu Core SQP MS
CBSE Sample Paper for Class 12 Urdu Elective SQP MS

Sample Paper for Class 12 Maths

cbse.nic.in – The CBSE Sample Papers for Class 12 Maths for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Maths Sample Question Paper Answers/ Marking Scheme
2019-2020 Download PDF Download
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

Sample Paper for Class 12 Physics

The CBSE Sample Papers for Class 12 Physics for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Physics Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

Sample Paper for Class 12 Chemistry

The CBSE Sample Papers for Class 12 Chemistry for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Chemistry Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

CBSE Topper Answer Sheet Class 12 Chemistry

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

Sample Paper for Class 12 Biology

The CBSE Sample Papers for Class 12 Biology for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Biology Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

CBSE Topper Answer Sheet Class 12 Biology

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

Sample Paper for Class 12 English Core

The CBSE Sample Papers for Class 12 English Core for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination English Core Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 SET-A PDF Download Download
2015-2016 SET B PDF Download Download

Sample Paper for Class 12 English Elective

The CBSE Sample Papers for Class 12 English Elective for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination English Elective Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 CBSE PDF Download Download
2016-2017 NCERT PDF Download Download
2015-2016 CBSE PDF Download Download
2015-2016 NCERT PDF Download Download

English Creative Writing and Translation Studies Sample Papers for Class 12

The CBSE Sample Papers for Class 12 English Creative Writing and Translation Studies for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Writing and Translation Studies Answers/ Marking Scheme
2016-2017 Download PDF Download
2017-2018 Download PDF Download

CBSE Topper Answer Sheet Class 12 English Core

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

CBSE Topper Answer Sheet Class 12 English Elective

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

Sample Paper for Class 12 Computer Science

The CBSE Sample Papers for Class 12 Computer Science for the academic year from 2015-2016 to 2019-2020 are as under:

Year of Examination Computer Science Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

Sample Paper for Class 12 Hindi Aichhik

cbse.nic.in Sample Papers for Class 12, Hindi Aichhik are part of CBSE Sample Papers for Class 12. Here we have given Hindi Aichhik Sample Papers for Class 12.

Year of Examination Hindi Aichhik Sample Question Paper Answers/ Marking Scheme
2018-2019 Download PDF Download
2017-2018 Download PDF Download
2016-2017 PDF Download Download
2015-2016 PDF Download Download

CBSE Topper Answer Sheet Class 12 Hindi Core

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

CBSE Topper Answer Sheet Class 12 Hindi Elective

Academic Year Topper Answer Sheet
 Topper Answer Sheet 2018 PDF Download
Topper Answer Sheet 2017 PDF Download
Topper Answer Sheet 2016 PDF Download
Topper Answer Sheet 2015 Download PDF
Topper Answer Sheet 2014 Download PDF

Leave a Comment