CBSE Class 12 Computer Science Sample Paper 2018 Set C

Read and download the CBSE Class 12 Computer Science Sample Paper 2018 Set C, designed by expert teachers according to the latest 2025-26 curriculum and examination pattern issued by CBSE, NCERT, and KVS. These Class 12 Computer Science sample papers include detailed step-by-step solutions, helping students to practice and evaluate their performance against the most recent marking schemes.

Solved Sample Paper for Class 12 Computer Science PDF

Our Class 12 Computer Science model papers are important for understanding the weightage of different chapters and the difficulty level of expected questions. By solving these guess papers Class 12 students can identify weak areas and improve time management. We also suggest referring to our Class 12 Computer Science Question Papers of previous years to further strengthen your exam preparation.

Class 12 Computer Science Sample Paper with Solutions

 

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

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

Students can easily download the CBSE Class 12 Computer Science Sample Paper 2018 Set C from our website to prepare for their upcoming examinations. To score high marks, it is important for Class 12 students to understand the exaact pattern as per which teachers design the question papers. We strongly suggest that you practice these latest sample papers for Computer Science and solve different types of questions that are expected to come this year. You can downloadin PDF format so that you can practice offline. We also recommend that Class 12 students solve these papers actual exam conditions at home.

Why should you solve CBSE Class 12 Computer Science Sample Paper 2018 Set C?

Practicing these model papers has several benefits for Class 12 students:

  • New Question Bank: This set has fresh questions for Computer Science which are different from previous years.
  • Exam Pattern Knowledge: Solving more sets will help you to understand the weightage of each chapter in Class 12 and also the type of questions asked.
  • Identify Weak Areas: Comparing your score in each set to find out topics in Class 12 Computer Science for which you need hard work.
  • Speed and Accuracy: Attempting MCQ questions and long-form problems for Class 12 Computer Science makes you faster and better and you will be able to finish your exam on time.

What should you do after solving CBSE Class 12 Computer Science Sample Paper 2018 Set C?

  1. Check Your Work: Match your answers with the solutions given by our teachers in the Computer Science Sample Paper PDF.
  2. Learn from Mistakes: Class 12 students should focus on the questions which you solved incorrectly and understand the error.
  3. Revision: If you find a question difficult you shoul refer to NCERT book for Class 12 Computer Science to understand concepts and then try the question again.
  4. Continuous Practice: Solve multiple sets of Computer Science sample papers from studiestoday.com to build confidence before the CBSE exams.
Where can I download the PDF for CBSE Class 12 Computer Science Sample Paper 2018 Set C?

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

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