CBSE Class 12 Computer Science Sample Paper 2017 (3)

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”);

puts(name)

}

(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 “;

cin>>num;

while(num)

{

fact=fact*fact;

--num;

}

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

}

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

void main()

{

clrscr();

char *NAME = "@KVid5yaLaY*a";

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

if (islower(NAME[x]))

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

else

if (isupper(NAME[x]))

if (x%2==0)

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

else

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

puts(NAME);

getch();

}

(e) Give the output of the following program 3

#include<iostream.h>

#include<conio.h>

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

{

int TEMP = B+C;

B += TEMP;

if(C != 150)

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

}

void main ( )

{

clrscr();

int M = 20, N = 10;

Execute(M);

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

Execute(M, N);

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

getch();

}

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

#include<stdlib.h>

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

randomize();

int N, numgus;

N=10;

numgus=random(N)+10; 

cout<<numgus<<endl;

getch();

}

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

{public:

~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).

Tags: 

 


Click to View or Download pdf file
Click for more Computer Science Study Material

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 Reduced Syllabus Class 9 and 10

The prevailing health emergency in the country and at different parts of the world as well as the efforts to contain the spread of Covid-19 pandemic has resulted in loss of class room teaching due to closure of schools. Therefore the CBSE Board has decided to revise...

Re verification of Class 10 Board Exams Marks

Modalities and Schedule for Secondary School (Class X) Examinations, 2020 in the subjects whose examinations have been conducted by CBSE for the processes of (I) Verification of Marks (II) Obtaining Photocopy of the Evaluated Answer Book(s) (Ill) Re-evaluation of Marks...

Internal Assessments and CBSE Reduced Syllabus

CBSE on 7th July 2020 had announced the ‘Revised Academic Curriculum for classes IX-XII for the session 2020-21’ to mitigate the effect of face to face learning loss due to the closure of schools to contain COVID-19 Pandemic. The rationalization of syllabus up to 30% ...

CBSE Reduced Syllabus Clarification

CBSE board has issued the following clarification relating to various news reports regarding reduction in syllabus and questions from the reduced syllabus during board exams. Please read below: It has come to notice of the Board through a section of media reports that...

Board Cancelled Official CBSE Statement

Keeping in view the requests received from various State Governments and the changed circumstances as on date, following has been decided- 1. Examinations for classes X and XII which were scheduled from 1st July to 15th, 2020 stand cancelled. 2. Assessment of the...

Cogito and The Question Book A series on Thinking skills by CBSE

The Board has dedicated this academic session 2020-21 for ‘Competency Based Learning’. Skills connected to Critical & Creative thinking, Problem Solving, Collaboration and Communication are core to successful living in the 21st Century. To focus on the importance...

×
Studies Today