(Download) CBSE Class-12 2016-17 Sample Paper And Marking Scheme (Computer Science)

Disclaimer: This website is NOT associated with CBSE, for official website of CBSE visit - www.cbse.gov.in

(Download) CBSE Class-12 2016-17 Sample Paper And Marking Scheme (Computer Science)


Time: 3Hrs.

MM: 70

Instructions:

i. All Questions are Compulsory.
ii. Programming Language : Section – A : C++
iii. Programming Language : Section – B : Python
iv. Answer either Section A or B and Section C is compulsory

Section – A

1 (a) Explain conditional operator with suitable example? 2
(b) Which C++ header file(s) are essentially required to be included to run/execute the following C++ code :
void main()
{
char *word1="Hello",*word2="Friends";
strcat(word1,word2);
cout<<word1;
}
1
(c) Rewrite the following program after removing the syntactical errors
(if any). Underline each correction.

#include<conio.h>
#include<iostream.h>
#include<string.h>
#include<stdio.h>
class product
{
int product_code,qty,price;
char name[20];
public:
product()
{
product_code=0;qty=0;price=0;
name=NULL;
}
void entry()
{
cout<<"\n Enter code,qty,price";
cin>>product_code>>qty>>price;
gets(name);
}
void tot_price() {return qty*price;}
};
void main()
{
p product;
p.entry();
cout<<tot_price();
}

(d) Write the output of the following C++ program code:

Note: Assume all required header files are already being included in the program.

void change(int *s)
{
for(int i=0;i<4;i++)
{
if(*s<40)
{
if(*s%2==0)
*s=*s+10;
else
*s=*s+11;
}
else
{
if(*s%2==0)
*s=*s-10;
else
*s=*s-11;
}
cout<<*s<<" ";
s++;
}
}
void main()
{
int score[]={25,60,35,53};
change(score);
}

Click Here To Download Full Sample Paper

Click Here To Download Full Marking Scheme

CBSE (Class XII) Previous Year Papers Printed Books

<<Go Back To Main Page