CBSE Class 12 Computer Science Sample Paper 2018 Set 02

Here is the CBSE Class 12 Computer Science Sample Paper 2018 Set 02 for your practice. Download professional Class 12 Computer Science sample papers featuring clear solutions, aligned with the 2026-27 syllabus standards of CBSE, NCERT, and KVS. Solving these mock sets lets students test their skills against current exam criteria.

CBSE Class 12 Computer Science Sample Question Papers

Every Class 12 Computer Science student should use these model papers to check chapter-wise marks distribution and question trends. Solving these practice tests makes managing your exam time much easier. For even better results, pair them with our Class 12 Computer Science Question Papers from past years.

Get Class 12 Computer Science Model Paper PDF

Section – A

1. (a) Find the correct identifiers out of the following, which can be used for naming variable, constants or functions in a C++ program : 

While, for, Float, new, 2ndName, A%B, Amount2, _Counter

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

typedef char TEXT[80];

void main()

{ TEXT Str[] = “Peace is supreme”; int Index=0;

while (Str[Index]!=’\0’)

if (isupper(Str[Index]))

Str[Index++]=’#’;

else

Str[Index++]=’*’;

puts(Str); }

(c) Observe the following C++ code very carefully and rewrite it after removing any/all syntactical errors with each correction underlined. 2

Note : Assume all required header files are already being included in the program.

#Define float Max=70.0;

Void main()

{

int Speed char Stop=’N’; cin>>Speed;

if Speed>Max

Stop=’Y’;

cout<<Stop<<end; }

(d) Write the output of the following C++ program code : 2

Note : Assume all required header files are already being included in the program.

void Position(int &C1,int C2=3)

{

C1+=2;

C2+=Y;

}

void main()

{

int P1=20, P2=4;

Position(P1);

cout<<P1<<”,”<<P2<<end1;

Position(P2,P1);

cout<<P1<<”,”<<P2<<end1;

}

(e) Write the output of the following C++ program code : 

Note : Assume all required header files are already being included in the program.

class Calc

{

char Grade; int Bonus;

public:

Calc() { Grade=’E’;Bonus=0;}

void Down(int G)

{ Grade–=G; }

void Up(int G)

{ Grade+=G; Bonus++; }

void Show()

{ cout<<Grade<<”#”<<Bonus<<end1; } };

void main()

{

Calc c;

C.Down(2);

C.Show();

C.Up(7);

C.Show();

C.Down(2);

C.Show();

}

(f) Study the following program and select the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can be assigned to the variable

NUM. 2

Note : Assume all required header files are already being included in the program.

– random(n) function generates an integer between 0 and n – 1.

void main()

{ randomize(); int NUM;

NUM=random(3)+2;

char TEXT[]=”ABCDEFGHIJK”;

for (int I=1;I<=NUM; I++)

{ for(int J=NUM; J<=7;J++)

cout<<TEXT[J];

cout<<end1;

} }

(i) FGHI (ii) BCDEFGH (iii) EFGH (iv) CDEFGH

FGHI BCDEFGH EFGH CDEFGH

FGHI EFGH

FGHI EFGH

2. (a) What is a copy constructor ? Give a suitable example in C++ to illustrate with its definition within a class and a declaration of an object with the help of it. 2

(b) Observe the following C++ code and answer the questions (i) and (ii) :

class Traveller

{ long PNR; char TName[20];

public : 

Traveller() //Function 1

{cout<<”Ready”<<end1;}

void Book(long P,char N[]) //Function 2

{ PNR = P; strcpy(TName, N); }

void Print() //Function 3

{ cout<<PNR << TName <<end1; }

~Traveller() //Function 4

{ cout<<”Booking cancelled!”<<end1; }

};

(i) Fill in the blank statements in Line 1 and Line 2 to execute Function 2 and Function 3

respectively in the following code : 1

void main()

{

Traveller T;

_________ //Line 1

_________ //Line 2

} //Stops here

(ii) Which function will be executed at }//Stopshere ? What is this function referred as ? 

(c) Write the definition of a class PIC in C++ with following description : 

Private Members

• Pno //Data member for Picture Number (an integer)

• Category //Data member for Picture Category (a string)

• Location //Data member for Exhibition Location (a string)

• FixLocation //A member function to assign Exhibition Location as per category

//as shown in the following table

Category Location

Classic Amina

Modern Jim Plaq

Antique Ustad Khan

Public Members

o Enter() //A function to allow user to enter values Pno,

//category and call FixLocation() function

o SeeAll() //A function to display all the data members

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

class Exterior

{ int OrderId; char Address[20];

protected:

float Advance;

public:

Exterior(); void Book(); void View();

};

class Paint : public Exterior

{

int WallArea, ColorCode;

protected: 

 

Please click the link below to download CBSE Class 12 Computer Science Sample Paper 2018 Set B

Download CBSE Sample Papers: Class 12 Computer Science

How to download CBSE Class 12 Computer Science Sample Paper 2018 Set 02 in PDF?

Access and download the CBSE Class 12 Computer Science Sample Paper 2018 Set 02 effortlessly from our platform to gear up for your upcoming school assessments. To achieve top scores, Class 12 students must understand the structural design used by educators. We advise practicing these current Computer Science sample papers to tackle expected question types. Save files in a convenient PDF format for offline revision, and attempt them under strict home exam conditions for best results.

Benefits of Practicing Class 12 Computer Science Sample Papers

  • Fresh Practice Material: Access unique questions for Computer Science crafted beyond standard previous year papers.
  • Blueprint Understanding: Gain a clear view of chapter weightage rules and question trends across Class 12.
  • Self-Assessment: Evaluate scores per set to pinpoint weak zones in Class 12 Computer Science that require focused revision.
  • Pacing & Precision: Working through Class 12 Computer Science objective and descriptive formats enhances response speed and test accuracy.

How to Analyze Your Performance in CBSE Class 12 Computer Science Sample Paper 2018 Set 02

  1. Self-Evaluation: Score your answers using the official guidance found in the Computer Science Sample Paper PDF.
  2. Targeted Correction: Class 12 pupils must re-solve questions answered incorrectly to master the correct method.
  3. Core Review: Look up challenging questions inside the NCERT book for Class 12 Computer Science to build solid fundamentals.
  4. Regular Practice: Solve extra Computer Science sample modules online to maximize preparedness for upcoming CBSE evaluations.

FAQs

Where can I download the PDF for CBSE Class 12 Computer Science Sample Paper 2018 Set 02?

You can download the complete PDF for CBSE Class 12 Computer Science Sample Paper 2018 Set 02 for free from StudiesToday.com. Our resources for Class 12 Computer Science are updated for the latest academic session and follow the official exam pattern.

Are solutions provided for CBSE Class 12 Computer Science Sample Paper 2018 Set 02?

Yes, CBSE Class 12 Computer Science Sample Paper 2018 Set 02 comes with detailed, teacher-verified solutions. We have provided step-by-step answers for Computer Science to help students of Class 12 understand correct methodology and marking scheme.

How can practicing CBSE Class 12 Computer Science Sample Paper 2018 Set 02 help in exam preparation?

Practicing this Computer Science paper helps in time management and identifying important topics. For Class 12, solving mock papers is the best way to gain confidence and reduce exam-day anxiety.

Is the CBSE Class 12 Computer Science Sample Paper 2018 Set 02 accessible on mobile and tablets?

Yes, all our study materials for Class 12 Computer Science are provided in a mobile-friendly PDF format. You can easily download CBSE Class 12 Computer Science Sample Paper 2018 Set 02 on your mobile device.