Page 167 - C++
P. 167

Model Test  Paper – VIII (Solved)

                                                         CLASS-XII


                                       SUBJECT: COMPUTER SCIENCE WITH C++

                                   (On the lines of New CBSE Examination Pattern)

        General Instructions:

        (a) All questions are compulsory.

        (b) Programming Language - 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) from the following: (2)

        (i) <>     (ii) %                          (iii)  !=                           (iv) &&

        Ans.  (i) <>       Relational Operator

        (ii) %         Arithmetic Operator

        (iii) !=             Relational Operator

        (iv)  &&       Logical Operator



        (b) Ronica Jose has started learning C++ and has typed the following program. When she compiled the
        following code, she discovered that she needs to include some header files to successfully compile and
        execute it. Write the names of those header files, which are required to be included in the code.

                                                                                                                 (1)

        void main()

        {

        double X,Times,Result;

        cin>>X>>Times;

        Result=pow(X,Times);

        cout<<Result<<endl;

        }

        Ans.  iostream.h    OR      iomanip.h    and math.h
   162   163   164   165   166   167   168   169   170   171   172