CBSE Class 12 Computer Science Sample Papers 2020 are available here for download in PDF format along with (Answers &) Marking Schemes. This year CBSE has released two Sample Papers for Class 12 Computer Science i.e. Old & New (Old - C++ & New - Python).
These CBSE Sample Papers for Class 12 Computer Science has been recently released by the Central Board of Secondary Education and are very important for the preparation of CBSE Class 12 Computer Science Board Exam 2020.
Content from CBSE Class 12 Computer Science Sample Paper 2020 (Old)
Q1.
(a) Write the type of C++ Operators (Arithmetic, Logical, and Relational
Operators) from the following:
(i) !
(ii) !=
(iii) &&
(iv) %
(b) Observe the following program very carefully and write the name of those
header file(s), which are essentially needed to compile and execute
thefollowing program successfully:
void main()
{
char text[20], newText[20];
gets(text);
strcpy(newText,text);
for(int i=0;i<strlen(text);i++)
if(text[i] = =’A’)
text[i] = text[i]+2;
puts(text);
}
Recommended Books for CBSE Class 12 Computer Science Board Exam 2020 Preparation:
CBSE Computer Science Chapter-wise Solved Papers Class 12 2019-20 |
(c) Rewrite the following C++ code after removing any/all Syntactical Error(s)
with each correction underlined.
Note: Assume all required header files are already being included in the
program.
#define float PI 3.14
void main( )
{
float R=4.5,H=1.5;
A=2*PI*R*H + 2*PIpow(R,2);
cout<<‘Area=’<<A<<endl;
}
(d)
Find and write the output of the following C++ program code:
Note: Assume all required header files are already being included in
the program.
void main( )
{
int Ar[ ] = { 6 , 3 , 8 , 10 , 4 , 6 , 7} ;
int *Ptr = Ar , I ;
cout<<++*Ptr++ << '@' ;
I = Ar[3] - Ar[2] ;
cout<<++*(Ptr+I)<<'@'<<"\n" ;
cout<<++I + *Ptr++ << '@' ;
cout<<*Ptr++ <<'@'<< '\n' ;
for( ; I >=0 ; I -=2)
cout<<Ar[I] << '@' ;
}
(e)
Find and write the output of the following C++ program code:
typedef char STRING[80];
void MIXNOW(STRING S)
{
int Size=strlen(S);
for(int I=0;I<Size;I+=2)
{
char WS=S[I];
S[I]=S[I+1];
S[I+1]=WS;
}
for (I=1;I<Size;I+=2)
if (S[I]>=’M’ && S[I]<=’U’)
S[I]=’@’;
}
void main()
{
STRING Word=”CBSEEXAM2019”;
MIXNOW(Word);
cout<<Word<<endl;
}
(f) Observe the following program and find out, which output(s) out of (i) to
(iv) willbe expected from the program? What will be the minimum and the
maximum value assigned to the variable Alter?
Note: Assume all required header files are already being included in the
program.
void main( )
{
randomize();
int Ar[]={10,7}, N;
int Alter=random(2) + 10 ;
for (int C=0;C<2;C++)
{
N=random(2) ;
cout<<Ar[N] +Alter<<”#”;
}
}
(i) 21#20#
(ii) 20#18#
(iii) 20#17#
(iv) 21#17#
.
.
.
Comments
All Comments (0)
Join the conversation