CBSE Class 12 Computer Science Sample Paper 2017 (3)

Scroll down for PDF

CBSE Class 12 Computer Science Sample Paper 2017 (3). It’s always recommended to practice as many sample papers as possible before the examinations. Students can download the sample papers and also question papers of previous years to practice and score better marks in examinations. Refer to other links too for more sample papers.

1. (a) What is the difference between Type casting and Automatic type Conversion? Give examples 2

(b)Write the names of the header files which are necessary to execute the following C++ code 1

void main()

{ char name[40];

strcpy(name, “Vijay Sharma”);



(c) Identify and correct the errors if any, underline the correction 2

#include<iostream h>

int main


Unsigned long i,fact=1;

cout<<”Enter a number “;







cout<<”the factorial is “<<fact;


(d) Find the output of the following program (imagine header files are included) 2

void main()



char *NAME = "@KVid5yaLaY*a";

for (int x = 0; x < strlen(NAME); x++)

if (islower(NAME[x]))

NAME[x] = toupper(NAME[x]);


if (isupper(NAME[x]))

if (x%2==0)

NAME[x] = tolower(NAME[x]);


NAME[x] = NAME[x-1];




(e) Give the output of the following program 3



void Execute(int &B, int C = 50)


int TEMP = B+C;

B += TEMP;

if(C != 150)

cout << " "<<TEMP<<" " <<" "<< B <<" "<< C << endl;


void main ( )



int M = 20, N = 10;


cout <<" "<< M<< " "<<" "<< N << endl;

Execute(M, N);

cout <<" "<<M <<" "<< N << endl;



(f) Find the possible out put(s) & What will be the minimum & Maximum values 2




void main()




int N, numgus;






2. (a)What do you mean by a temporary instance of a class ? What is its use? how is it created? 2

(b)Answer the questions(i) and(ii) after going through the following class: 2

class TestMeOut


~TestMeOut() //Function 1

{ cout<<"Play over"<<endl; }

TestMeOut( ) //Function 2

{cout<<"Preparing to play"<<endl;

void MyWork( )

{ cout<<"Playing"<<endl


(i) In OOP what is Function 1 referred as and when does it get invoked?

(ii) In OOP what is Function 2 referred as and when does it get invoked? Write the statement to

invoke Function2.

(c) Define a class serverspace with the following specifications. 4

Private members of the class

Filenames – an array of strings of size[10][25]

( to represent all the names of files inside serverspace )

Availspace – long

( to represent total number of bytes available in serverspace)

Usedspace – long

( to represent total number of bytes used in serverspace)

public members of the class

(d)Answer the questions i to iv based on the following code 4

Newfileentry() – Afunction to accept values of Filenames, Availspace and Usedspace from user

Retavailspace() – A Fucntion that returns the value of total Kilobytes

available ( 1 Kilobytes = 1024 bytes)

Showfiles() – a function that displays the names of all the files in serverspace

Please click the link below to download CBSE Class 12 Computer Science Sample Paper 2017 (3).


Click on the text For more study material for Computer Science please click here - Computer Science

Latest NCERT & CBSE News

Read the latest news and announcements from NCERT and CBSE below. Important updates relating to your studies which will help you to keep yourself updated with latest happenings in school level education. Keep yourself updated with all latest news and also read articles from teachers which will help you to improve your studies, increase motivation level and promote faster learning

CBSE examination board hike the fee for class 10th and 12th

The CBSE (Central Board Secondary Education) increased the examination fees for classes 10 and 12 of the 2020 boards, with no profit no loss principle, from Rs. 750 to Rs 1500, for all categories of students, including SC/ST candidates for all schools throughout India...

Error in the evaluation of answer sheets in CBSE

The education board has witnessed many events where invigilators are being suspended for allotting wrong marks to the students.  This has affected students mainly of classes X and XII in the 2019 CBSE Board Exams. The central board of secondary education has taken...

How to crack a competitive examination

“How I crack a competitive examination” is a frequently asked question by today’s students. Cracking a competitive exam is a challenging task. Attaining a huge amount of study and solving several complex problems in a limited amount of time is a huge task. Competitive...

CBSE Board Secretary says Class 10 and 12 CBSE Exam Pattern to be modified

The Central Board of Secondary Education is expected to introduce a few changes to the exam pattern for class 10 and board exams by 2023. Anurag Tripathi, secretary of CBSE speaking at an Assoham School Education Summit said that although this year class 10 students...

TIPS: Study habits for success

Being a student is fairly a difficult job. Alongside maintaining your curricular as well as extra-curricular activities adds more to it. Performance in academics is one of the major concerns. Every parent now tries to get their children more indulged in studies. Need...

JEE in Punjabi too after English, Hindi and Gujarati

Punjab Minister Tript Rajinder Singh Bajwa requested the joint technology entrance exam (main) to be conducted in Punjabi and other regional languages too. In his letter to Union HRD Minister Ramesh Pokhriyal Nishank, the Punjab Minister for Higher Education and...

Studies Today