Go Back   2022-2023 StudyChaCha > StudyChaCha Discussion Forum > General Topics

  #1  
Old April 23rd, 2014, 12:52 PM
Sashwat's Avatar
Super Moderator
 
Join Date: Jun 2011
Default

Can any one here can give me the solved previous year question paper of Computer science C++ of class 12th of Central Board of Secondary Education?

As you want to get the solved previous year question paper of Computer science C++ of class 12th of Central Board of Secondary Education so here is the information of the same for you:

Some content of the file has been given here:

1. (a) What is the difference between Local Variable and Global Variable ? Also,
give suitable C++ code to illustrate both. 2
(b) Write the names of the header files, which is/are essentially required to
run/execute the following C++ code: 1
void main ()
{
char C, String [] = “Excellence Overload”;
for (int I=0; String [I] ! = „\0‟;I++}
if (String [I] == „ ‟)
cout< else
{
C=toupper(String [I]);
cout< }
}
(c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. 2
#include [iostream.h]
typedef char Text (80);
void main ()
{
Text T=“Indian”;
int Count=strlen(T);
cout< }
(d) Find the output of the following program: 3
# include
void ChangeArray (int Number, int ARR[], int Size)
{
for (int L=0; L If (L
ARR[L] + = L;
else
ARR[L] * = L;
}
void Show(int ARR [], int Size)
{
for (int L=0; L (L%2!=0) ? cout< }
void main ( )
{
int Array [] = {30,20,40,10,60,50};
ChangeArray (3, Array, 6);
Show (Arry,6);
}
(e) Find the output of the following program: 2
# include
void main ( )
{
int Track [] = {10,20,30,40,}, *Striker ;
Striker=Track ;
Track [1] + = 30 ;
cout<<“Striker>”<<*Striker< * Striker - =10 ;
Striker++;
cout<<“Next @”<<*Striker < Striker+=2 ;
cout<<“last @”<<*Striker< cout<<“Reset To” < }
(f) Go through the C++ code shown below, and find out the possible output or
output from the suggested output options (i) to(iv). Also, write the least
value and highest value, which can be assigned to the variable guess. 2
# include
#include
void main ( )
{
randomize ();
int Guess, High=4 ;
Guess=random (High) +50;
for (int C=guess ; C<=55 ; C++)
cout<
}
(i) 50 # 51 # 52 # 53 # 54 # 55 #
(ii) 52 # 53 # 54 # 55 #
(iii) 53 # 54 #
(iv) 51 # 52 # 53 # 54 # 55
2. (a) Differentiate between members, which are present within the private visibility
mode with those which are present within the public visibility modes. 2
(b) Write the output of the following C++ code. Also, write the name of feature of
Object Oriented Programming used in the following program jointly illustrated by
the functions [I] to [IV]. 2
#include
void Print ( ) // Function [I]
{
for (int K=1;K<=60; K++) cout<< “-”;
cout< }
void Print (int N) //Function[II]
{
for (int K=1;K<=N; L++) cout<<“*”;
cout< }
void Print(int A, int B) //Function[III]
{
for(int K=1;K<=B;K++) cout< cout< }
void Print(char T, int N) // Function[IV]
{
for (int K=1;k<=N;K++) cout< cout< }
void main( )
{
int U=9,V=4,W=3;
char C =‟@‟;
Print(C,V);
Print(U,W);
}
(c) Define a class candidate in C++ with following Description:
Private Members 4
A data member RNo (Registration Number) of type long
A data member Name of type string

A data member Score of type float
A data member Remark of type string
A member function AssignRem( ) to assign Remarks as per the Score
obtained by a candidate. Score range and the respective Remarks are
shown as follows:
Score Remarks
>=50 Selected
less than 50 Not selected
Public members
A function ENTER( ) to allow user to enter values for RNo, Name, Score
& call function AssignRem() to assign the remarks.
A function DISPLAY( ) to allow user to view the content of all the data
members.
(d) Answer the question (i) to (iv) based on the following: 4
class Student
{
int Rno;
char Name[20];
float Marks;
protected:
void result( );
public:
Student ( );
void Register ( ); void Display( );
};
class Faculty
{
long FCode;
char FName [20];
protected:
float Pay;
public:
Faculty ( );
void Enter( );
void Show( );
};
class Course: public Student, private Faculty
{
long CCode [10]; char CourseName [50];

char StartDate [8], EndDate [8];
public:
Course( );
void Commence ( );
void CDetail ( );
};
(i) Which type of inheritance is illustrated in the above C++ code?
(ii) Write the names of all the data members, which is /are accessible from
member function Commence of class Course.
(iii) Write the names of member functions, which are accessible from objects of
class Course.
(iv) Write the names of all the members, which are accessible from objects of
class faculty.
3. (a) Write a Get1From2( ) function in C++ to transfer the content from two arrays
FIRST[ ] and SECOND[ ] to array ALL[ ]. The even places (0, 2, 4,…) of array
ALL[] should get the content from the array FIRST[ ] and odd places (1,3,5,…)
of the array ALL [ ]should get the content from the array SECOND[ ] . 3
Example:
If the FIRST[ ] array contains
30, 60, 90
And the SECOND[ ] array contains
10, 50, 80
The ALL[ ] array should contain
30, 10, 60, 50, 90, 80
(b) An array P[20] [50] is stored in the memory along the column with each of its
Element occupying 4 bytes, find out the location of P[15] [10], if P[0][0] is stored
at 5200. 3
(c) Write a function in C++ to Perform insert operation on a dynamically
allocated Queue containing Passenger details as given in the following
definition of NODE. 4
struct NODE
{
long Pno; //passenger number
char Pname[20]; //passenger name
NODE *Link;
};

(d) Write a COLSUM ( ) function in C++ to find sum of each column of each
column of a NxM matrix. 2
(e) Evaluate the following postfix notation of expression :
50, 60, +,20, 10, -, * 2
4. (a) Observe the program segment given below carefully and fill the blanks
marked as Statement 1 and Statement 2 using seekg( ), seekp( ), tellp( ) and tellg()
functions for performing the required task. 1
# include
class PRODUCT
{
int Pno; char pname [20]; int qty;
public :
:
void ModifyQty ( ); // The function is to modify quantity of a
PRODUCT
};
void PRODUCT :: ModifyQty ( )
{
fstream Fil;
Fil.open (“PRODUCT.DAT” , ios : : binary | ios : : in | ios : : out);
int MPno;
cout<<“Product No to modify quantity :”; cin>>MPno;
while( Fil.read ((char*) this, sizeof (PRODUCT)))
{
if (MPno ==Pno)
{
cout<<“present quantity:” < cout<<“changed quantity:”; cin>>Qty;
int position = ________; //Statement 1
___________________; //Statement 2
Fil.write ((char*) this, sizeof (PRODUCT)); // Re-writing
the Record
}
}
Fil.close( );
}
(b) Write a function in C++ to count the no. of “Me” or “My” words present in a
text file “DIARY.TXT”. 2
If the file “DIARY.TXT” content is as follows :
My first book was Me and My
family. It gave me chance to be

known to the world.
The output of the function should be
Count of Me/ My in file : 4
(c) Write a function in C++ to search for a laptop from a binary file
“LAPTOP.DAT” containing the objects of class LAPTOP (as defined below).
The user should enter the Model No and the function should search and
display the details of the laptop. 3
class LAPTOP
{
long ModelNo;
float RAM, HDD;
char Details[120];
public:
void StockEnter ( ) {cin>>Model No>>RAM>>HDD; gets(Details);}
void StockDisplay( ){cout< long ReturnModelNo ( ) { return ModelNo ;}
};


Marking Scheme ó Computer Science
General Instructions :
1. The answers given in the marking scheme are SUGGESTIVE, Examiners are requested to
award marks for all alternative correct Solutions / Answers conveying the similar meaning
2. All programming questions have to be answered with respect to C++ Language only.
3. In C++, ignore case sensitivity for identifiers
(Variable/Functions/Structures/Class Names)
4. In SQL related questions - both ways of text/character entries should be acceptable for
Example: “AMAR” and ‘amar’ both are correct.
5. In SQL related questions - all date entries should be acceptable for Example: 'DD-Mon-
YY', "DD/MM/YY", 'DD/MM/YY', "MM/DD/YY", 'MM/DD/YY', and {MM/DD/YY}
are correct.
6. In SQL related questions - semicolon should be ignored for terminating the SQL statements
7. In SQL related questions, ignore case sensitivity.
QUESTION PAPER CODE 91/1
EXPECTED ANSWERS
1. (a) What is the difference between Local Variable and Global Variable?
Also, give a suitable C++ code to illustrate both. 2
Ans Local Variables: Local variables are those variables which are declared
within a function or a compound statement and these variables can only be
used within that function/scope.
Global Variables: Global variables are those variables which are not declared
within any function or scope. So, these variables can be accessed by any
function of the program.
Example
#include
#include
int G; // Global variable declared
341
void Fun ( )
{
int L = 25; // Local variable of function Fun ( ) assigned value 25
G=5; // Global Variable is accessed and assigned value 5
Cout< Cout< }
void main ( )
{
Fun ( ) ; // Function call
G = G + 5; // Global variable is incremented by 5
cout< }
(½ Mark for each correct explanation of Local Variable and Global
Variable)
(½ Mark for each correct example of Local variable and Global Variable)
OR
(Full 2 Maries for correct example(s) demonstrating the meaning of /
difference between Local Variable and Global Variable)
OR
(Only 1 Mark to be awarded if Explanation without supporting examples)
(b) Write the names of the header files, which is/are essentially required to run/
execute the following C++ code:
void main ( )
{
char C, String [ ] = "Excellence Overload";
for (int I=0; String [ I ] ! = '\ 0'; I ++ )
if (String [I] ==' ')

cout< else
{
C=toupper(String[I]);
cout< }
}
Ans iostream.h
ctype.h
(½ Mark for writing each correct header file)
(c) Rewrite the following program after removing the syntactical errors (if any).
Underline each correction. 2
#include[iostream.h]
typedef char Text(80) ;
void main ( )
{
Text T= "Indian";
int Count=strlen(T) ;
cout< }
Ans #include
#include
typedef char Text [80];
void main ( )
{
Text T= "Indian";
int Count=str1en(T);
cout<
}
(½ Mark for writing # include
(½ Mark for writing # include
(½ Mark for writing typedef char Text(80];
(½ Mark for writing "has" and "characters")
(d) Find the output of the following program: 3
#inc1ude
void ChangeArray(int Number, int ARR[ ], int Size)
{
for (int L =0; L if (L ARR [L] +=L;
e1se
ARR [L] *=L;
}
void Show (int ARR [ ], int Size)
{
for (int L=0; L (L%2!=0) ?cout< }
void main ( )
{
int Array [ ] = {30, 20, 40, 10, 60, 50};
ChangeArray (3, Array, 6) ;
Show (Array, 6) ;
}

Ans 30
21#42
30#240
250#
(½ Mark for each correct value)
Note:
Deduct ½ Mark for not writing # at proper places
Deduct ½ Mark for not considering endl at proaer places
(e) Find the output of the following program: 2
#include
void main ( )
{
int Track [ ] = {10, 20, 30, 40}, *Striker ;
Stxiker=Track :
Track [1] += 30 ;
cout<<"Striker>"<<*Striker< Striker – =10 ;
Striker++ ;
cout<<"Next@"<<*Striker< Striker+=2 ;
cout<<"Last@"<<*Striker< cout<< "Reset To" < }
Ans Striker>10
Next@50
Last@40
Reset to 0

(½ for writing each line of output correctly)
Note:
Deduct ½ Mark if any/all special characters are missing
Deduct ½ Mark if endl is not considered at the right positions
(f) Go through the C++ code shown below, and find out the possible output or
outputs from the suggested Output Options (i) to (iv). Also, write the least
value and highest value, which can be assigned to the variable Guess. 2
#include
#include
void main ( )
{
randomize ( ) ;
int Guess, High=4;
Guess=random{High)+ 50 ;
for{int C=Guess ; C<=55 ; C++)
cout< }
(i) 50 # 51 # 52 # 53 # 54 # 55 #
(ii) 52 # 53 # 54 # 55
(iii) 53 # 54 #
(iv) 51 # 52 # 53 # 54 # 55
Ans (i) 50 # 51 # 52 # 53 # 54 # 55 #
Least value 50
Highest value 53
(1 Mark for mentioning correct option (i))
( ½ Mark for mentioning correct Least value of Guess)
(½ Mark for mentioning correct Highest value of Guess)

2. (a) Differentiate between members, which are present within the private visibility
mode with those which are present within the public visibility modes. 2
Ans Private members of a class are accessible only to the member functions of the
same class.
Public members of a class are accessible to the member functions of the same
class as well as member functions of its derived class(es) and also to an object
of the class.
Example:
class Base
{
int N;
public:
void Assign ()
{
N=10;
}
};
class Derived: public Base
{
int X;
public:
void DisplayBase()
{
cout< Assign ( ) ; //Accessible
}
} ;
void main ( )

{
Base B;
B.Assign( ) ; //Accessible
}
(1 Mark for correct explanation OR example illustrating non accessibility of
Private Members inside Derived class)
(1 Marie for correct explanation OR example illustrating accessibility of Public
Members inside Derived Class and to object of the class)
(b) Write the output of the following C++ code. Also. write the name of feature
of Object Oriented Programming used in the following program jointly
illustrated by the function [I] to [IV]. 2
#include
void Print ( ) // Function [I]
{
for (int K=1 ; K<=60 ; K++) cout<< "-" ;
cout< }
void Print (int N) // Function [II]
{
for (int K=1 ; K<=N ; L++) cout<<"*" ;
cout< }
void Print (int A, int.B)
{
for (int K=1. ;K<=B ;K++) cout < cout< }
void Print (char T, int N) // Function [IV]

{
for (int K=1 ; K<=N ; K++) cout< cout< }
void main ( )
{
int U=9, V=4, W=3;
char C='@' ;
Print (C,V) ;
Print (U,W) ;
}
Ans. @@@@
91827
OR
No Output as L is not declared in void Print (int N)
Polymorphism
OR
Function Overloading
(½ Mark for writing each correct line of output)
(1 Mark for writing the feature name correctly)
(c) Define a class Candidate in C++ with following description: 4
Private Members
_ A data member RNo (Registration Number) of type long
_ A data member Name of type string
_ A data member Score of type float
_ A data member Remarks of type string

\_ A member function AssignRem( ) to assign Remarks as per the Score
obtained by a candidate. Score range and the respective Remarks are
shown as follows:
Score Remarks
>=50 Selected
less than 50 Not selected
Public Members
_ A function ENTER ( ) to allow user to enter values for RNo, Name,
Score & call function AssignRem( ) to assign the remarks.
_ A function DISPLAY ( ) to allow user to view the content of all the data
members.
Ans class Candidate
{
long RNo;
char Name[20];
float Score;
char Remarks[20];
void AssignRem( ) ;
public:
void Enter( );
void Display( );
} ;
void Candidate: :AssignRem( )
{
if (Score>=50)
strcpy (Remarks,"Selected") ;
else
strcpy(Remarks,"Not Selected") ;
}

void Candidate: : Enter ( )
{
cin>>RNo ;
gets (Name) ; cin>>Score;
AssignRem( ) ;
}
void Candidate: isplay()
{
cout< }
(½ Mark for correct syntax for class header)
(½ Mark for correct declaration of data members)
(1 Mark for correct definition of AssignRem())
(1 Mark for correct definition of Enter() with proper invocation of
AssignRem() function)
(1 Mark for correct definition of Display())
NOTE:
_ Deduct ½ Mark to be deducted if Assignrem() is not invoked properly
inside Enter( ) function
_ No marks to be deducted if member function definitions are written
inside the class
(d) Answer the questions (i) to (iv) based on the following:
class Strident
(
int Rno;
char Name [20] ;
float Marks;

protected:
void Result( ) ;
public:
Student( ) ;
void Register( ); void Display( ) ;
} ;
class Faculty
{
long FCode;
char FName[20];
protected:
float Pay;
public :
Faculty ( ) ;
void Enter ( ) ;
void Show ( ) ;
} ;
class Course : public Student, private Faculty
{
long CCode [10]; char CourseName [50] ;
char StartDate[8], EndDate[8] ;
public :
Course ( ) ;
void Commence ( ) ;
void CDetail ( ) ;
} ;

(i) Which type of inheritance is illustrated in the above C++ code?
Ans Multiple Inheritance
(1 Mark for correct answer)
(ii) Write the names of the all data members, which is/are accessible from
member function Commence of class Course.
Ans CCode, CourseName, StartDate, EndDate, Pay
(1 Mark for correct answer)
Note:
No marks to be awarded for any other alternative answer
(iii) Write the names of member functions, which are accessible from objects
of class Course.
Ans Commence( ), CDetail( ), Register( ), Display( )
(1 Mark for correct answer)
Note:
_ No marks to be awarded for any other alternative answer
_ Constructor functions to be ignored
(iv) Write the name of all the members, which are accessible from objects
of class Faculty.
Ans Enter( ), Show( )
(1 Mark for correct answer)
Note:
_ No marks to be awarded for any other alternative answer
_ Constructor functions to be iqnored
3 (a) Write a Get1From2 ( ) function in C++ to transfer the content from two
arrays FIRST[ ] and SECOND[ ] to array ALL[ ]. The even places (0, 2, 4,
...) of array ALL[ ] should get the content from the array FIRST[ ] and odd
places (1, 3, 5, ) of the array ALL[] should get the content from the array
SECOND[ ].
353
Example:
If the FIRST[ ] array contains
30, 60, 90
And the SECOND[ ] array contains
10, 50, 80
The ALL[ ] array should contain
30, 10, 60, 50, 90, 80
Ans void Get1From2 (int ALL[],int FIRST[],int SECOND[],
int N,int M)
{
for(int I=0,J=0,K=0;i if (I%2==0)
ALL[I]=FIRST[J++];
else
ALL[I]=SECOND[K++];
}
OR
void Get1From2(int ALL[],int FIRST[],int SECOND[],
int N, int M)
{
int J=0,K=0;
for(int I=0;i {
if (I%2==0)
{
ALL [I] =FIRST [J] ;
J++;
}

else
{
ALL[I]=SECOND[K];
K++;
}
}
}
(1 Mark for correct loop)
(½ Mark for checking even locations)
(½ Mark for checking even locations or writing else for odd locations)
( 1 Mark for incrementing FIRST and SECOND Array Locations)
(b) An array P[20] [50] is stored in the memory along the column with each of its
element occupying 4 bytes, find out the 1ocation of P[15][10], if P[0][0] is
stored at 5200. 3
Ans Assuminq LBR=LBC=0
B=5200
W=4 bytes
Number of Rows(N)=20
Number of Columns(M)=50
LOC(Arr[I] [J]) = B +(I + J*N)*W
LOC(Arr[15][10]) = 5200+(15+10*20)*4
= 5200 + (215*4)
= 5200 + 860
= 6060
(1 Mark for writing correct formula (for row major) OR substituting
formula with correct values for calculating Address)
(2 marks for calculating correct address)
Note:
1 Mark to be awarded for writing only the correct answer (i.e. 6060)

(c) Write a function in C++ to perform Insert: operation on a dynamically allocated
Queue containing Passenger details as given in the following definition of
NODE. 4
struct NODE
{
long Pno; //passenger Number
char Pname[20] ; //passenger Name
NODE *Link.;
} ;
Ans class Queue
{
NODE *Front, *Rear;
public:
Queue ( ) {Front = NULL; Rear = NULL; }
void QueInsert ( ) ;
void QueDel ( ) ;
void QueDis ( ) ;
~Queue ( ) ;
} ;
void Queue: : QueInsert ( )
{
NODE*Temp=new NODE;
cin>>Temp->Pno; gets (Temp->Pname) ;
Temp->Link = NULL;
Rear->Li.nk = Temp;
Rear = Temp ;
}

(1 Mark for creating a new NODE dynamically)
(1 Mark for assigning NULL to Link of new NODE)
(1 Mark for linking the Rearmost NODE to the new NODE)
(1 Mark for making the new NODE as the Rearmost NODE)
(d) Write a COLSUM( ) function in C++ to find sum of each column of a NxM
Matrix. 2
Ans void COLSUM(int A[] [100], int N, int M)
{
int SUMC;
for (int j=0; j {
SUMC = 0;
for (int i=0; i SUMC = SUMC + A[i] [j] ;
Cout<< "Sum of Column "< }
}
(½ Mark for writing correct outer loop)
(½ Mark for initializing SUMC with 0 for each column)
(½ Mark tor writing correct inner loop)
(½ Mark for finding sum of each column)

For more detailed information I am uploading a PDF file which is free to download:

Contact Details:
Central Board of Secondary Education
Community Centre, Preet Vihar Metro Railway Station,
Shiksha Kendra,Building No.2,
Preet Vihar Rd,
Block D, Preet Vihar,
New Delhi
Delhi
India

Map Location:
Attached Files Available for Download
File Type: pdf Solved previous year question paper of Computer science C++ of class 12th.pdf (278.9 KB, 296 views)

Last edited by Aakashd; May 21st, 2019 at 10:09 AM.
Reply With Quote
Other Discussions related to this topic
Thread
CBSE Class 12th Commerce(Accountancy) solved papers
CBSE Board 12th Class Solved Question Papers
CBSE 12th Class Exam Solved Papers
CBSE Class 12th Business Studies Solved question papers
12th class of CBSE Board Question Papers for English
CBSE class 12th Physics Solved Papers
CBSE Board Class 12th question papers
Old Question Papers for 12th Class of CBSE
CBSE Class 12th Science Physics Question Paper
CBSE Class 12th Question Papers with Solutions
CBSE class 12th question papers
Computer Science Class 12 Question Papers CBSE
Central Board of Secondary Education class 12th question papers of Computer Science f
CBSE 12th C++ subject Solved question papers
CBSE 12th Accountancy Solved question papers
12th Class CBSE Accountancy Question Papers
12th class of CBSE Board Question Papers for Computer Science
CBSE Class 12th Solved Question Papers
CBSE class 12th computer Science Paper with solution
CBSE 12th Class solved question papers






  #2  
Old January 23rd, 2015, 10:04 AM
Super Moderator
 
Join Date: Apr 2013
Default Re: Computer science C++ of class 12th solved question papers of CBSE

You need CBSE class 12th C++ question paper, here I am giving here:

What is the difference between Global Variable and Local Variable? Also, give
a suitable C++ code to illustrate both.

Which C++ header file(s) will be essentially required to be included to run /
execute the following C++ code:
void main()
{
char Msg[ ]="Sunset Gardens";
for (int I=5;I puts(Msg);
}

Rewrite the following program after removing the syntactical errors (if any).
Underline each correction.
#include [iostream.h]
class MEMBER
{
int Mno;float Fees;
PUBLIC:
void Register(){cin>>Mno>>Fees;}
void Display{cout< };
void main()
{
MEMBER M;
Register();
M.Display();
}

Find the output of the following program: 3
#include
struct GAME
{ int Score, Bonus;};
void Play(GAME &g, int N=10)
{
g.Score++;g.Bonus+=N;
}
void main()
{
GAME G={110,50};
Play(G,10);
cout< Play(G);
cout< Play(G,15);
cout< }

CBSE 12th C++ paper





For detailed paper, here is attachment........................
Attached Files Available for Download
File Type: pdf CBSE 12th C++ paper.pdf (200.2 KB, 177 views)
__________________
Answered By StudyChaCha Member
Reply With Quote
Reply


Reply to this Question / Ask Another Question
Your Username: Click here to log in

Message:
Options



All times are GMT +6. The time now is 06:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2

1 2 3 4 5 6 7 8