Page 152 - C++
P. 152

MODEL TEST PAPER- VII

                                       SUBJECT: COMPUTER SCIENCE WITH C++


                                                         CLASS-XII

        General Instructions:

        (a) All questions are compulsory.

        (b) Programming Language with C++

        (c) Question 2(b, d) ,3 and 4 has internal choices.

        Time: 3 Hrs.                                                                                  M.M.:70

        ==================================================================================================

        Q1 (a) Write the type of C++ Operators (Arithmetic, Logical, and Relational Operators) for the following: (2)

        (i) ||     (ii) /                           (iii)  !=                           (iv) >

         (b) Observe the following program and give the name of necessary header file(s), required to compile and
        execute it successfully:                                                                              (1)

        void main()

        {

        char CH, Text[]=”+ve Attitude”;

        for(int I=0;Text[I]!=’\0’;I++)

        if(Text[I]==’ ’)

               cout<<endl;

        else
        {


               CH=toupper(Text[I]);
               cout<<CH;


        }
        }

         (c) Rewrite the following C++ code after removing any/all Syntactical Error(s) with each correction underlined.

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

        #define Equation(p,q) p+2*q

        void main()

        {
   147   148   149   150   151   152   153   154   155   156   157