Page 569 - Cs_withBlue_J_C11_Flipbook
P. 569

The expression of the logic diagram is:
                     (a) A.(B+C)’+A.B.C

                     (b) A.(B+C)’+A+B+C

                     (c)  A+(B+C)’+A.B.C
                     (d) None of the above
                 (v)  What will be the output of the following code?                                                   [1]

                     public static void main(String args[ ])

                      {
                       int sum=0;
                       for(int i=1;i<=5;i++)

                       {

                           sum=i;
                       }
                     System.out.println(sum);
                     }
                     (a) 5
                     (b) 6
                     (c)  7
                     (d) 8

                 (vi)  Assertion:  An array is a composite data type.                                                  [1]
                     Reason: The values stored in an array are known as array elements.

                     (a)  Both Assertion and Reason are true, and Reason is the correct explanation for Assertion.
                     (b)  Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion.

                     (c)  Assertion is true and Reason is false.
                     (d)  Assertion is false and Reason is true.

                 (vii) Draw a truth table for the following expression:                                                [1]
                     ABC+A.(B+C)

                 (viii) Why NAND gate is called a “Universal Gate”?                                                    [1]
                 (ix)  Why write() method of stream class is used?                                                     [1]

                 (x)  What is the use of java.util package?                                                            [1]
                 Question 2:

                 (i)   If x=2,y=5; find the value of  x+= ++x  + x++  -  ++y  / 7. Show working.                       [2]
                 (ii)  State the final value of q at the end of the following program segment after execution.         [2]

                     for(m=2;m<=3;++m)

                     {
                     for(n=1;n<=m;++n)


                                                                                                                       567
                                                                                                     Model Test Paper  567
   564   565   566   567   568   569   570   571   572   573   574