CBSE Class 12 Computer Science Sample Paper 2018 Set 03

Class 12 Computer Science Solved Model Papers: CBSE Class 12 Computer Science Sample Paper 2018 Set 03

Access comprehensive sample question papers for Class 12 Computer Science using the CBSE Class 12 Computer Science Sample Paper 2018 Set 03. Designed to align with the 2026-27 CBSE academic guidelines, these model papers help students assess their exam readiness and understand current marking schemes.

Download Class 12 Computer Science Sample Paper PDF

Navigate directly to the solved Computer Science model papers using the digital viewer below. Each practice set includes detailed solutions, allowing students to instantly cross-check their work and identify areas requiring further revision.

1.(a) Explain in brief the purpose of function prototype with the help of a suitable example. 

(b) Name the header files that shall be needed for successful compilation of the following C++ code : 

void main()

{ char str[20],str[20];

gets(str); strcpy(str1,str); strrev(str); puts(str); puts(str1); }

(c) Deepa has just started working as a programmer in STAR SOFTWARE company. In the company she has got her first assignment to be done using a C++ function to find the smallest number out of a given set of numbers stored in a one-dimensional array. But she has committed some logical mistakes while writing the code and is not getting the desired result. Rewrite the correct code underlining the corrections done. Do not add any additional statements in the corrected code. 

int find(int a[],int n)

{ int s=a[0];

for(int x=1;x<n;x++)

if(a[x]>s)

a[x]=s;

return(s);

}

(d) Find output of the following program segment : 

#include<iostream.h>

#include<ctype.h>

void Mycode(char Msg[],char CH)

{

for(int cnt=0;Msg[cnt]!=‘\0’;cnt++)

{ if(Msg[cnt]>=‘B’&& Msg[cnt]<=‘G’) Msg[cnt]=tolower(Msg[cnt]);

else

if(Msg[cnt]==‘N’||Msg[cnt]==‘n’Msg[cnt]==‘’)

Msg[cnt]=CH; else

if(cnt%2==0)

Msg[cnt]=toupper(Msg[cnt]);

else

Msg[cnt]=Msg[cnt–1]; } }

void main()

{ char MyText[]="Input Raw";

Mycode(MyText,‘@’);

cout<<"NEW TEXT:"<<MyText<<endl; }

(e) Find the output of the following program : 

#include<iostream.h>

void in(int x,int y, int &z)

{ x+=y;

y- -; 

z*=(x–y); }

void out(int z,int y, int &x)

{ x*=y; y++;

z/=(x+y); }

void main()

{ int a=20, b=30, c=10;

out(a,c,b);

cout<<a<<"#"<<b<<"#"<<c<<"#"<<endl;

in(b,c,a);

cout<<a<<"@"<<b<<"@"<<c<<"@"<<endl;

out(a,b,c);

cout<<a<<"$"<<b<<"$"<<c<<"$"<<endl;

}

(f) Write a user defined function DIVT() which takes an integer as parameter and returns whether it is divisible by 13 or not. The function should return 1 if it is divisible by 13, otherwise it should return 0. 2

2.(a) Explain data hiding with an example. 2

(b) Define a class CONTEST in C++ with the following description : 

Private Data Members

Eventno integer

Description char(30)

Score integer

qualified char

Public Member functions

● A constructor to assign initial values Eventno as 11, Description as ‘‘School level’’, Score as 100, qualified as ‘N’.

● Input() – To take the input for Eventno, description and score.

● Award (int cutoffscore) – To assign qualified as ‘Y’, if score is more than the cutoffscore that is passed as argument to the function, else assign qualified as ‘N’.

● Displaydata() – to display all data members.

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

class schoolbag

{ int pockets;

public:

schoolbag() //Function 1

{ pockets=30;

cout<<"The bag has pockets"<<end1; }

void company() //Function 2

{

cout<<"The company of the Bag is ABC"<<end1;

}

schoolbag(int D) //Function 3

{

pockets=D;

cout<<"Now the Bag has pockets"<<pockets<<end1;

~schoolbag() //Function 4

{ cout<<"Thanks"<<end1; }

};

(i) In Object Oriented Programming, what is Function 4 referred as and when does it get invoked/called ?

(ii) In Object Oriented Programming, which concept is illustrated by Function 1 and Function 3 together ?

(d) Consider the following class state : 4

class State

{

protected:

int tp; //no. of tourist places

public:

State()

{ tp = 0; }

void inctp()

{ tp++; }

int gettp()

{ return tp; } };

Write a code in C++ to publically derive another class ‘District’ with the following additional members derived in the Public visibility mode.

Data Members distname – char (50) population – long

Member functions :

● dinput() – To enter distname and population.

● doutput() – To display distname and population on screen.

3. (a) Write a function in C++ TWOTOONE() which accepts two array X[ ], Y[ ] and their size n as argument. Both the arrays X[ ] and Y[ ] have the same number of elements. Transfer the content from two arrays X[ ], Y[ ] to array Z[ ]. The even places (0,2,4...) of array Z[ ] should get the contents from the array X[ ] and odd places (1,3,5...) of array Z[ ] should get the contents from the array Y[ ].3

Example : If the X[ ] array contains 30,60,90 and the Y[ ] array contains 10,20,50. Then Z[ ] should contain 30,10,60,20,90,50.

(b) Given an array A[10][12] whose base address is 10000. Calculate the memory location of A[2][5] if each element occupies 4 bytes and array is storedcolumnwise. 

(c) Define member function delque() to perform delete operation on a linked queue where each node has the following structure : 

struct node

{ char name[20]

int marks;

node *link; };

class queue

{ node *front,*rear;

public:

queue() {front=rear=NULL; }

void delque(); };

 

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

Exam Preparation Sample Paper for Class 12 Computer Science CBSE Class 12 Computer Science Sample Paper 2018 Set 03

Get Started with CBSE Class 12 Computer Science Sample Paper 2018 Set 03 (CBSE)

Access structured sample papers for Class 12 Computer Science. Solving the CBSE Class 12 Computer Science Sample Paper 2018 Set 03 provided above helps students understand official exam blueprints and tackle anticipated question formats with confidence.

Maximize Your Scores with Model Papers

  • Exam Blueprint: Understand mark allocations and structural guidelines relevant to Class 12 evaluations.
  • Targeted Improvement: Identify weak areas in Class 12 Computer Science requiring focused revision.
  • Pacing & Precision: Practice mixed question formats to build execution speed and ensure timely paper completion.

Post-Practice Strategy for Class 12 Computer Science

  1. Verify Answers: Compare your responses against professional teacher solutions provided in the sample paper keys.
  2. Error Analysis: Class 12 learners must review incorrect answers carefully to understand underlying mistakes.
  3. Concept Reinforcement: Consult the official NCERT book for Class 12 Computer Science when stuck before re-attempting problems.

FAQs

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

You can download the complete PDF for CBSE Class 12 Computer Science Sample Paper 2018 Set 03 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 03?

Yes, CBSE Class 12 Computer Science Sample Paper 2018 Set 03 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 03 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 03 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 03 on your mobile device.