Page 291 - C++
P. 291

CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
                                      (Sub Code: 083 Paper Code 91 Outside 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) new
                          (ii) While
                          (iii) case
                          (iv) Num_2


                   Ans     (i) new        - Keyword
                           (ii) While     - User defined Identifier
                           (iii) case      - Keyword
                           (iv) Num_2  - 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 three errors                                      1
                           as follows:
                           (i)   Function strlen should have prototype
                           (ii)  Undefined symbol cout
                           (iii) Undefined symbol endl

                           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 Txt[] = "Welcome";
                              for(int  C= 0; C<strlen(Txt); C++)
                                  Txt[C] = Txt[C]+1;
                              cout<<Txt<<endl;
                           }



                                                     Page #1 of 28
   286   287   288   289   290   291   292   293   294   295   296