myCBSEguide App
Download the app to get CBSE Sample Papers 2024-25, NCERT Solutions (Revised), Most Important Questions, Previous Year Question Bank, Mock Tests, and Detailed Notes.
Install NowCBSE Question Paper 2013 class 12 Computer Science conducted by Central Board of Secondary Education, New Delhi in the month of March 2013. CBSE previous year question papers with solution are available in myCBSEguide mobile app and cbse guide website. The Best CBSE App for students and teachers is myCBSEguide which provides complete study material and practice papers to cbse schools in India and abroad.
CBSE Question Paper 2013 class 12 Computer Science
Class 12 Computer Science list of chapters
- Review of Python
- Concept of Object Oriented Programming
- Classes in Python
- Inheritance
- Linear List Manipulation
- Stacks & Queues in list
- Data File Handling
- Exception Handling & Green Functions
- Databases Concepts and SQL
- Structure Query Language
- Boolean Algebra
- Boolean Functions & Reduce Forms
- Application of Boolean Logic
- Networking Concepts (Part 1)
- Networking Concepts (Part 2)
- Networking Protocols
- Mobile Telecommunication Technologies, Network Security and Internet Services
CBSE Question Paper 2013 class 12 Computer Science
General Instructions:
- All questions are compulsory.
- Programming Language: C++
1. (a) What is the benefit of using function prototype for a function? Give a suitable example to illustrate it using a C++ code. (2)
(b) Observe the following C++ code and write the name(s) of the header fi1e(s), which will be essentially required to run it in a C++ compiler: (1)
void main ()
{
int Number; .
cin>>Number,
if (abs (Number) ==Number),
cout<<“Positive'<<end1;
}
(c) Observe the following C++ code carefully and rewrite the same after removing all the syntax error(s) present in the code. Ensure that you underline each correction in the code. (2)
Important Note:
— All the desired header files are already included, which are required to run the code.
__ Correction should not change the logic of the program.
#define Convert (P,Q) P+2*Q;
void main ()
{
Float A, B, Result,
cin>>A>>B ;
Result=Convert [A,B] ;
cout<<“Output:“<<Resu1t<<endline;
}
(d) Observe the following C++ code carefully and obtain the output, which will appear on the screen after execution of it. (2)
Important Note:
__ All the desired header files are already included in the code, which are required to run th code.
void main ( )
{
char *String=”SHAKTI”;
int *Point,Value []={10,15,70,19);
Point=Value;
cout<<*Point<<String<<endl,
String++;
Point++;
cout<<*Point<<String<<endl;
}
(e) Observe the following C++ code carefully and obtain the output, which will appear on the screen after execution of it. (3)
#include <iostream.h>
claas Aroundus
{
int Place, Humidity, Temp;
public:
Aroundus(int P=2) (Place=P; Humidity=60; Temp=20;)
void Hot(int T) (Temp+=T;}
void Humid(int H) (Humidity+=H;)
void JustSee()
{
cout <<PI ace << ” : ” <<Ternp< < ” a ” <<Humicl i I.y < < ” % ” <<endl ,
}
};
void main ( )
{
Aroundus A,B(5),
A.HOt(10),
A.JustSee(),
B.Humid(15);
B.Hot(2);
B.JustSee(),
A.Humid(5);
A.JustSee();
}
(f) Based on the following C++ code, find out the expected correct output(s) from the options (i) to (iv). Also, ftnd out the minimum and the maximum value that can be assigned to the variable Trick used in the code at the time when
value of Count is 3: (2)
void main()
{
char Status[] (10]=(“EXCEL“,”GOOD”,”OK”};
int Turn=l0,Trick;
for(int Count=l;Count<4;Count++)
{
Trick=random(Count);
cout<<Turn-Trick<<Status[Trick]<<“#”;
}
}
(i) l0EXCEL#lOEXCEL#8OK#
(ii) 10EXCEL#8OK#9GOOD#
(iii) 10EXCEL#9GOOD#10EXCEL#
(iv) 10EXCEL#10GOOD#8OK#
2. (a) Write any two differences between Constructor and Destructor. Write the function headers for constructor and destructor of a class Member. (2)
(b) Answer the questions (i) and (ii) after going through the following class: (2)
class Motor
{
int MotorNo, Track;
public:
Motor(); //Function l
Motor(int MN); //Function 2
Motor(Motor &M); //Function 3
void Allocate(); //Function 4
void Move(); //Function 5
};
void main()
{
Motor M,
:
:
}
(i) Out of the following, which of the option is correct for calling Function 2?
Option l-Motor N(M);
Option 2-Motor P(10);
(ii) Name the feature of Object Oriented Programming, which is illustrated by Function 1, Function 2 and Function 3 combined together.
(c) Define a class Tourist in C++ with the following specification: (4)
Data Members
- Camo – to store Bus No
- Origin – to store Place name
- Destination – to store Place name
- Type – to store Car Type such as ‘E’ for Economy
- Distance – to store the Distance in Kilometers
- Charge – to store the Car Fare Member Functions
- A constructor function to initialize Type as ‘E’ and Freight as 250
- A function CalcCharge() to calculate Care as per the following criteria :
Type Charge
‘E’ l6*Distance
‘A’ 22*Distance
‘L’ 30*Distance
- A function Enter() to allow user to enter values for Camo, Origin, Destination, Type and Distance. “also, this function should call CalcCharge() to calculate Fare.
- A function Show() to display the content of all the data members on screen.
(d) Consider the following C++ code and answer the questions from (i) to (iv) : (4)
class Student
{
int Class,Rno,
char Section;
protected
char SName[20J,
public:
Student();
void Stentry();
void Stdisplay();
};
class Score: private Student
{
float Marks [5];
protected:
char Grade[5J,
public:
Score ();
void Sentry(),
void Sdisplay();
};
class Report: public Score
{
float Total, Avg;
public:
char OverallGrade, Remarks[20]
Report(),
void REvaluate(),
void RPrint(),
);
(i) Which type of Inheritance is shown in the above example?
(ii) Write the names of those data members, which can be directly accessed from the objects of class Report.
(iii) Write the names of those member functions, which can be directly accessed from the objects of class Report.
(iv) Write the names of those data members, which can be directly accessed from the Sentry() function of class Score.
3. (a) Write code for a function void Convert (int T [ ] , int. Num) in C++ , which re-positions all the elements of the array by shifting each of them one to one position before and by shifting the first element to the last position. (3)
For example: If the content of the array is
0 | 1 | 2 | 3 | 4 |
22 | 25 | 70 | 32 | 12 |
The changed content will be:
0 | 1 | 2 | 3 | 4 |
25 | 70 | 32 | 12 | 22 |
(b) An array P[15][10] is stored along the column in the memory with each element requiring 4 bytes of storage. If the base address of array P is 14000, find out the location of P(8][5]. (3)
(c) Write a user-defined function DispNTen ( int L [] [4] , int R , int. C)in C++ to find and display all the numbers, which are not divisible by 10.
For example if the content of array is: (2)
20 | 17 | 30 |
12 | 19 | 10 |
The output should be
17 12 19
Evaluate the following postfix expression. Show the status of stack after execution of each operation: (2)
60 , 6 , / , 5 , 2 , *, 5, -, +
(e) Write a function QINSERT() in C++ to perform insert operation on a Linked Queue, which contains Client no and Client name. Consider the following definition of NODE in the code of QINSERT(). (4)
struct NODE
{
long int Cno; //Client No
char Cnamel20J; //Client Name
NODE *Next,
4. (a) Fill in the blanks marked as Statement 1 and Statement 2, in the program segment given below with appropriate functions for the required task. (1)
class Customer
{
Long int CNo; //Customer Number
char CName[20]; //Customer Name
char Email[30] ; //Email of Customer
public:
void Allocate(); //Function to allocate a member
void Show(); //Function to show customer data
void ModifyEmail() //Function to modify Email
{
Cout<<“Enter Modified Email:”;
gets(Email);
}
long int GetCno() (return CNo;)
};
void ChangeData()
{
fstream File;
File.open(“CUST.DAT”,ios::binary/ios::in)ios::out),
int Change=0,Location;
long int ChangeCno;
cout<<“Cno – whose email required to be modified:”;
cin>>ChangeCno,
Customer CU;
while(!Modify && File.read((char*)&CU,sizeof(CU)))
{
if (CU.GetCno()==ChangeCno)
{
CU.ModifyEmai1();
Location=File.tellg()- sizeof (CU);
//Statement l:To place file pointer to the required position ________________;
//Statement 2:To write the object CU on to the binary file __________________;
Change++;
}
}
if (Change)
cout<<“Email Modified..”<<end1;
else
cout<<“Customer not found. “<<endl;
File.close();
}
(b) Write a function CountHisHer ( ) in C++ which reads the contents of a text file
diary.txt and counts the words His and Her (not case sensitive). (2)
For example, if the file contains.
Pinaky has gone to his friend’s house. His friend’s
name is Ravya. Her house is 12 KM from here.
The function should display the output as
Count for His:2
Count for Her:1
(c) Assuming the class VINTAGE as declared below, write a function in C++ to read the objects of VINTAGE from binary file VINTAGE.DAT and display those vintage vehicles, which are priced between 200000 and 250000. (3)
class VINTAGE
{
int VNO; //Vehicle Number
char VDesc[10] ; //Vehicle Description
float Price,
public
void GET() (cin>>VNO;gets (VDesc) ;cin>>Prioe;)
void VIEW()
{
cout<<VNO<<endl;
cout<<VDesc<<endl;
cout<<Price<<endl;
}
float ReturnPrice() {return Price;}
These are First 4 questions only. To view and download complete question paper with solution install myCBSEguide App from google play store or login to our student dashboard.
Last Year Question Paper Class 12 Computer Science 2015
Download class 12 Computer Science question paper with solution from best CBSE App the myCBSEguide. CBSE class 12 Computer Science question paper 2015 in PDF format with solution will help you to understand the latest question paper pattern and marking scheme of the CBSE board examination. You will get to know the difficulty level of the question paper.
Previous Year Question Paper for class 12 in PDF
CBSE question papers 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005 and so on for all the subjects are available under this download link. Practicing real question paper certainly helps students to get confidence and improve performance in weak areas.
- Physics
- Chemistry
- Mathematics
- Biology
- Accountancy
- Business Studies
- Economics
- History
- Geography
- Political Science
- Physical Education
- Computer Science
- Informatics Practices
- English Core
- Hindi Core
- Hindi Elective
- Other Subjects
To download CBSE Question Paper class 12 Accountancy, Chemistry, Physics, History, Political Science, Economics, Geography, Computer Science, Home Science, Accountancy, Business Studies and Home Science; do check myCBSEguide app or website. myCBSEguide provides sample papers with solution, test papers for chapter-wise practice, NCERT solutions, NCERT Exemplar solutions, quick revision notes for ready reference, CBSE guess papers and CBSE important question papers. Sample Paper all are made available through the best app for CBSE students and myCBSEguide website.
Test Generator
Create question paper PDF and online tests with your own name & logo in minutes.
Create NowmyCBSEguide
Question Bank, Mock Tests, Exam Papers, NCERT Solutions, Sample Papers, Notes
Install Now
Read More >>> Computer Fundamental MCQs <<<