Page 343 - C++
P. 343
CBSE AISSCE 2017-2018 Marking Scheme for Computer Science
(2018-2019 Sub Code: 083 Paper Code: 91)
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) else (ii) Long (iii) 4Queue (iv) _count
Ans (i) keyword (ii) Identifier (iii) None (iv) Identifier
NOTE: Ignore (iii)
(Full 2 Marks for ALL correct answers - (i), (ii) and (iv))
(1½ Mark for any TWO correct answers out of (i), (ii) and (iv))
(1 Mark for any ONE correct answer out of (i), (ii) and (iv))
(b) The following C++ code during compilation reports errors as follows: 1
Error: ‘ofstream’ not declared
Error: ‘strupr’ not declared
Error: ‘strcat’ not declared
Error: ‘FIN’ not declared
Write the names of the correct header files, which must be included to compile
the code successfully:
void main()
{
ofstream FIN("WISH.TXT");
char TEXT2[]="good day";
char TEXT1[]="John!";
strupr(TEXT2);
strcat(TEXT1, TEXT2);
FIN<<TEXT1<<endl;
}
Page #1/35