Page 242 - C++
P. 242
CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
(Sub Code: 083 Paper Code 91/1 Delhi)
General Instructions:
● 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
● All programming questions have to be answered with respect to C++
Language / Python only
● In C++ / Python, ignore case sensitivity for identifiers (Variable / Functions
/ Structures / Class Names)
● In Python indentation is mandatory, however, number of spaces used for
indenting may vary
● In SQL related questions – both ways of text/character entries should be
acceptable for Example: “AMAR” and ‘amar’ both are acceptable.
● In SQL related questions – all date entries should be acceptable for Example:
‘YYYY-MM-DD’, ‘YY-MM-DD’, ‘DD-Mon-YY’, “DD/MM/YY”, ‘DD/MM/YY’,
“MM/DD/YY”, ‘MM/DD/YY’ and {MM/DD/YY} are correct.
● In SQL related questions – semicolon should be ignored for terminating the
SQL statements
● In SQL related questions, ignore case sensitivity.
SECTION A - (Only for candidates, who opted for C++)
1 (a) Write the type of C++ tokens (keywords and user defined identifiers) from the 2
following:
(i) For
(ii) delete
(iii) default
(iv) Value
Ans (i) For - user defined identifier
(ii) delete - keyword
(iii) default - keyword
(iv) Value - user defined identifier
(½ Mark for writing each correct keywords)
(½ Mark for writing each correct user defined identifiers)
(b) Anil typed the following C++ code and during compilation he found four errors as 1
follows:
(i) Function strlen should have a prototype
(ii) Undefined symbol cout
(iii) Undefined symbol endl
(iv) Function getchar should have a prototype
On asking his teacher told him to include necessary header files in the code.
Write the names of the header files, which Anil needs to include, for successful
compilation and execution of the following code:
void main()
{
char S[] = "Hello";
for(int i = 0; i<strlen(S); i++)
S[i] = S[i]+1;
cout<<S<<endl;
getchar();
}
Page #1 of 28