CBSE Class 12 Computer Science Sample Paper 2018 Set C

Read and download PDF of CBSE Class 12 Computer Science Sample Paper 2018 Set C designed as per the latest curriculum and examination pattern for Class 12 issued by CBSE, NCERT and KVS. The latest Class 12 Computer Science Sample Papers have been provided with solutions so that the students can solve these practice papers and then compare their answers. This will help them to identify mistakes and improvement areas in Computer Science Class 12 which they need to study more to get better marks in Class 12 exams. After solving these guess papers also refer to solved Class 12 Computer Science Question Papers available on our website to build strong understanding of the subject

Sample Paper for Class 12 Computer Science Pdf

Students can refer to the below Class 12 Computer Science Sample Paper designed to help students understand the pattern of questions that will be asked in Class 12 exams. Please download CBSE Class 12 Computer Science Sample Paper 2018 Set C

Computer Science Class 12 Sample Paper

 

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

CBSE Class 12 Computer Science Sample Paper 2018 Set C

We hope you liked the above provided CBSE Class 12 Computer Science Sample Paper 2018 Set C. To get an understanding of the type of questions which were asked in exams, it is important for Class 12 students to understand the way sample Paper are set by teachers. Students can download the Sample Paper for Class 12 Computer Science which will be coming in the exams so that you can practise them and solve all types of questions that can be asked in exams. By doing CBSE Class 12 Computer Science Sample Paper 2018 Set C you will understand the regular questions and MCQ questions for Class 12 Computer Science which are always asked. You can download CBSE Class 12 Computer Science Sample Paper and Class 12 Computer Science Question Papers in PDF. You should attempt all the last year question paper for Class 12 and Class 12 Computer Science MCQ Test in examination conditions at home and then compare their answers with the solutions provided by our teachers.

Where can I download CBSE Class 12 Computer Science Sample Paper 2018 Set C in Pdf

You can download CBSE Class 12 Computer Science Sample Paper 2018 Set C from StudiesToday.com

How can I improve my scores by solving CBSE Class 12 Computer Science Sample Paper 2018 Set C

Regular practice of sample question paper given on studiestoday for CBSE Class 12 Computer Science Sample Paper 2018 Set C can help you to score better marks in exams

Are there any websites that offer free CBSE Class 12 Computer Science Sample Paper 2018 Set C

Yes, studiestoday.com provides all latest CBSE Class 12 Computer Science Sample Papers with answers based on the latest format issued for current academic session

Are mock CBSE Class 12 Computer Science Sample Paper 2018 Set C available in multiple languages

Yes, mock CBSE Class 12 Computer Science Sample Paper 2018 Set C are available in multiple languages, including English, Hindi