Page 293 - C++
P. 293

CBSE AISSCE 2016-2017 Marking Scheme for Computer Science
                                      (Sub Code: 083 Paper Code 91 Outside Delhi)


                                  A=NUM[CNT];
                                  B=NUM[CNT-1];
                                  cout<<Diff(A,B)<<'#';
                              }
                           }

                   Ans     22#40#9#13#

                           (½ Mark for writing each correct value)
                           OR
                           (1 Mark to be awarded if the output written in reverse order as
                           13#9#40#​22#​)
                           Note: Deduct ½ Mark for not considering any/all # as separator and/or
                           writing the values in different lines

                   (e)     Find and write the output of the following C++ program code:                       3
                           Note: Assume all required header files are already being included
                           in the program.
                           void main()
                           {
                              int *Point, Score[]={100,95,150,75,65,120};
                              Point = Score;
                              for(int L = 0; L<6; L++)
                              {
                                  if((*Point)%10==0)
                                     *Point /= 2;
                                  else
                                     *Point -= 2;
                                  if((*Point)%5==0)
                                     *Point /= 5;
                                  Point++;
                              }
                              for(int L = 5; L>=0; L--)
                                cout<<Score[L]<<"*";
                           }


                   Ans     12*63*73*15*93*10*

                           (½ Mark for writing each correct value)

                           Note:
                           ●   Deduct ½ Mark for not considering any/all * as separator and or writing
                               the values in different lines
                           ●   Deduct ½ Mark if the output written in reverse order as
                               10*93*15*73*63*​12*
                           ●   Full 3 Marks to be awarded if “Multiple declaration/syntax error for L”
                               is mentioned

                   (f)     Look at the following C++ code and find the possible output(s) from the                                     2
                           options (i) to (iv) following it. Also, write the maximum values that can
                           be assigned to each of the variables N and M.

                           Note:


                                                     Page #3 of 28
   288   289   290   291   292   293   294   295   296   297   298