# CBSE 12th Computer Science Question Papers

Mar 11 • Board Sample Papers • 9078 Views • 9 Comments on CBSE 12th Computer Science Question Papers

Central Board of Secondary Education is abbreviated as C.B.S.E. which is the most reputed governmental Board of Education which is capable of serving quality education for private and public schools in India. While preparing for Computer Science subject, students generally confused about the type of questions that comes in the exams because it includes difficult concepts behind coding, logics, algorithm.Thus the purpose of setting this 12th Computer Science Question Paper is to make you aware the pattern of the paper which will help you get excellent marks in your board exams.

CBSE 12th Computer Science Question Papers

As a graduate, I have tried to set this CBSE 12th Computer Science Question Paper to help Board Students in this regard. Some help has been taken from previous year board papers and the NCERT textbooks. For any kind of suggestion related to the content of this paper or post, please let me know through comment section.

Class 12 CBSE model question paper CS

General Instructions:
a) This paper consist question from 1 to 7.
b) Marks are mentioned to each questions for your convenience.
c) The given paper is of total 80 marks.
d) Remaining 30 marks is for Practical Exam.

Question-1

(a) What is the difference between call by value and call by reference? Also, give a suitable C++ code to illustrate both. [2 Mark]

(b) Write the names of the header files, which is/are essentially required to run/ execute the following c++ code: [1 Mark]
void main ( )
{
char CH,Text[ ] =”+ve Attitude”;
for (int I=0 ; Text[I] ! =” ;I++)
if (Text[I]== ‘ ‘)
cout<<end1;
else
{
CH=toupper (Text [I]) ;
cout<<CH;
}
}

(c) Rewrite the following program after removing the syntactical errors (if any). Underline each correction. [2 Mark]
include
typedef char [80] String;
void main ( )
{
String S= “Peace”;
int L=strlen(S) ;
cout<<S<< ‘has'<<L<< ‘characters'<<end1;
}

(d) Find the output of the following program:  [3 Mark]
#include
void SwitchOver(int A [ ], int N, int Split)
{
for (int K=0 ; K<N; K++)
if (K<Split)
A(K]+ =K;
else
A [K]*=K;
}
void Display (int A [ ], int N)
{
for (int K=0 ; K<N ; K++)
(K%2==0)? cout<<A[K]<<“%”:cout<<A(K]<<end1;
}
void main ( )
{
int H[ ]= {30,40,50,20,10,5};
SwitchOver (H, 6, 3);
Display (H, 6);
}

(e) Find the output of the following program:  [2 Mark]
#include
void main ( )
{
int *Queen, Moves [ ] = {11, 22, 33, 44};
Queen = Moves;
Moves [2] + = 22;
Cout<< “Queen @”<<*Queen<<end1;
*Queen – = 11;
Queen + = 2;
cout<< “Now @”<<*Queen<<end1;
Queen++;
cout<< “Finally@”<<*Queen«end1;
cout<< “New Origin @”<<Moves[0]<<end1;
}

(f) Go through the C++ code shown below, and find out the possible output or outputs from the suggested Output Options (i) to (iv). Also, write the minimum and maximum values, which can be assigned to the variable MyNum.  [2 Mark]
#include
#include
void main ( )
{
randomize ( ) ;
int MyNum, Max=5;
MyNum = 20 + random (Max) ;
for (int N=MyNum; N<=25;N++)
cout<N<“*”;
}

(i) 20*21*22*23*24*25
(ii) 22*23*24*25*
(iii) 23*24*
(iv) 21*22*23*24*25

Question-2

(a) Differentiate between Constructor and Destructor function with respect to Object Oriented Programming. [2 Mark]

(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 [I] to [IV] [2 Mark]
#include
void Line ( ) //Function [I] {
for (int L=1;L<=80;L++) cout<<“-“;
cout<<end1;
}
void Line (int N) //Function[II] {
for (int L=l;L<=N;L++) Cout<<“*”;
cout<<endl;
}
void Line (char C, int N) //Function [III] {
for (int L=l;L<=N;L++) cout<<C;
cout<<end1;
}
void Line (int M, int, N) //Function [IV] {
for (int L=1;L<=N;L++) cout<<M*L;
cout<=80 A
less than 80 and >=65 B
less than 65 and >=50 C
less than 50 D
Public Members
 A function ENTER() to allow user to enter values for ANo, Name, Agg & call function GradeMe() to find the Grade.  A function_RESULT( ) to allow user to view the content of all the data members.

(d) Answer the questions (i) to (iv) based on the following:[4 Mark]
class Student
{
int Rollno:
char SName[20];
float Marksl;
protected:
void Result ( ) ;
public:
Student ( ) ;
void Enroll ( ) ;void Display ( ) ;
} ;
class Teacher
{
long TCode;
char TName [20];
protected:
float Salary;
public:
Teacher ( );
void Enter ( ) ;
void Show ( ) ;
} ;
class Course: public Student, private Teacher
{
long CCode [10]; char CourseName [50];
char StartDate [8] , EndDate [8];
public:
Course ( ) ;
void Commence ( );
void CDetail ( ) ;
} ;

(i) Write the names of member functions, which are accessible from objects of class Course
(ii) Write the names of all the data members, which is/are accessible from member function Commence of class Course
(iii) Write the names of all the-members, which are accessible from objects of class Teacher.
(iv) Which type of Inheritance is illustrated in the above C++ code?

Question-3

3. (a) Write a Get2From1() function in C++ to transfer the content from one array ALL[] to two different arrays Odd[] and Even[]. The Odd[] array should contain the values from odd positions (1,3,5,…) of ALL[] and Even [] array should contain the values from even positions (0, 2, 4,…..) of ALL []. [3 Mark]
Example
If the ALL[] array contains
12, 34, 56, 67, 89, 90
The Odd[] array should contain
34, 67, 90
And the Even [] array should contain
12, 56, 89

(b) An array G[50][20] is stored in the memory along the row with each of its elements occupying 8 bytes. Find out the location of G[10][15], if G[0][0] is stored at 4200. [3 Mark]

(c) Write a function in C++ to perform Delete operation on a dynamically allocated Queue containing Members details as given in the following definition of NODE: [4 Mark]
struct NODE
{
long Mno //Member Number
char Mname[20]; //Member Name
};

(d) Write a DSUMO function in C++ to find sum of Diagonal Elements from a NxN Matrix. [2 Mark]
(Assuming that the N is a odd number)

(e) Evaluate the following postfix notation of expression: [2 Mark]
True, False, NOT, AND, True, True, AND,OR

Question-4

4. (a) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekg( ), seekp( ) tellp( ) and tellg( ) functions for performing the required task.[1 Mark]
#include
class ITEM
{
int Ino;char Iname[20]; float Price;
public:
void ModifyPrice() ;//The function is to modify
price of a particular ITEM
} ;
void item: :ModiyPrice()
{
fstream File;
File.open (“ITEM.DAT”, ios::binary | ios::in | ios: :out) || ;
int CIno;
cout<>CIno;
while (file.read ((char*) this, sizeof (ITEM)))
{
if (CIno==Ino)
{
cout<<“Present Price:”<<Price<<end1;
cout<>Price;
int FilePos = __________ ; //Statement 1,
___________________; //Statement 2
File.write((char*)this,sizeof(ITEM)) ;
// Re-writing the record
}
}
File.close ( ) ;
}

(b) Write a function in C++ to count the no. of “He” or “She” words present in a text file “STORY. TXT”. 2

If the file “STORY. TXT” content is as follows:
He is playing in the ground. She is Playing with her dolls.
The output of the function should be Count of He/She in file: [2 Mark]

(c) Write a function in C++ to search for a camera from a binary file “CAMERA.DAT” containing the objects of class” CAMERA (as defined below). The user should enter the Model No and the function should search display the details of the camera. [3 Mark]
class CAMERA
{
long ModelNo;
float MegaPixel;
int Zoom;
char Details[120];
public:
void Enter ( ) {cin>>ModelNo>>MegaPixel>>Zoom;gets(Details);}
void Display ( )
{cout<<ModelNo<<MegaPixel<<Zoom<<Details<<endl;}
long GetModelNo ( ) {return ModelNo;}
};

Question-5

5. (a) What do you understand by Selection & Projection operations in relational algebra?
Consider the following tables EMPLOYEE and SALGRADE and answer (b) and (c) parts of this question: [2 Mark]

## Table: EMPLOYEE

 ECODE NAME DESIG SGRADE DOJ DOB 101 Abdul Ahmad EXECUTIVE S03 23-Mar-2003 13-Jan-1980 102 Rav:i. Chander HEAD-IT S02 12-Feb-2010 22-Jul-1987 103 John Ken RECEPTIONIST S03 24-June-2009 24-Feb-1983 105 Nazar Ameen GM S02 11-Aug-2006 03-Mar-1984 108 Priyam Sen CEO S01 29-Dec-2004 19-Jan-1982

 SGRADE SALARY HRA S0l 56000 18000 S02 32000 12000 S03 24000 8000

(b) Write SQL commands for the following statements: [4 Mark]

(i) To display the details of all EMPLOYEEs, in descending order of DOJ
(ii) To display NAME and DE51G of those EMPLOYEEs, whose SALGRADE is either 502 or 503
(iii) To display the content of all the EMPLOYEEs table, whose DOJ is in between’09-Feb-2006′ and ’08-Aug-2009′.
(iv) To add a new row with the following: 109, ‘Harish Roy’, ‘HEAD-IT’, ‘S02′, ’09-Sep-2007, ’21-Apr-1983’

(c) Give :the output of the following SQL queries: [2 Mark]
(ii) SELECT MIN(DOB), MAX (DOJ) FROM EMPLOYEE;

Question-6

6 (a) Verify the following using Truth Table: [2 Mark]
X+Y. Z=(X+Y).(X+Z)

(b) Write the equivalent Boolean Expression for the following Logic Circuit: [2 Mark]
circuit

(c) Write the SOP form of a Boolean function F, which is represented in a truth table as follows: [1 Mark]

table

(d) Reduce the following Boolean Expression using K-Map: [3 Mark]
F(A, B,C, D) = Σ (0,1, 2, 4, 5, 6, 7, 8, 10)

Question-7

7. (a) In networking, what-is WAN? How is it different from LAN? [1 Mark]

(b) Differentiate between XML and HTML. [1 Mark]

(c) What is WEB2.0? [1 Mark]

(d) Out of the following, identify client side script (s) and server side script (s). [1 Mark]
(i) Javascript
(ii) ASP
(iii) vbscript
(iv) JSP

(e) Great Studies University is setting up its Academic schools at Sunder Nagar and planning to set up a network. The university has 3 academic schools and one administration center as shown in the diagram below: [4 Mark]

Center to center distances between various buildings is as follows :

 Law School to Business School 60m Law School to Technology School 90m Law School to Admin Center 115m Business School to Technology School 40m Business School to. Admin Center 45m Technology School to Admin Center 25m

Number of Computers in each of the Schools/Center is follows:

 Law School 25 Technology School 50 Admin Center 125 Business School 35

(i) Suggest the most suitable place (i.e. School/Center) to install the server of this university with a suitable reason.
(ii) Suggest an ideal layout for connecting these schools/ center for a wired connectivity.
(iii) Which device will you suggest to be placed/installed in each of these schools / center to efficiently connect all the computers within theseschools / center?
(iv) The university is planning to connect its admission office in the closest big city, which is more than 350 km from the university. Which type of network out of LAN, MAN or WAN will be formed? Justify your answer.

(f) Compare Open Source Software and Proprietary Software. [1 Mark]

(g) What are cookies? [1 Mark]

NOTE:
To get pdf of above sample paper,follow: CBSE 12th Computer Science Question Papers.
To get pdf of more CS sample paper,follow: Computer Science 12th CBSE Sample Papers

Computer Science:

Maths:

Science:

### 9 Responses to CBSE 12th Computer Science Question Papers

1. mayank says:

sample paper

2. mayank says:

sample paper

3. mayank says:

sample paper

4. mayank says:

sample paper

5. mayank says:

sample paper

6. mayank says:

sample paper

7. mayank says:
8. mayank says:
9. Vishal Deb says:

This site is very helpful site, one more is very good for cbse computer science and informatics practices students. Check it.