Page 116 - computer science (868) class 11
P. 116

5.  String str="I am an Indian";
                    "I am an Indian" is an example of ………………… .
                    a.  Integer                                     b.  String Literal
                    c.  Variable                                    d.  None of these
                  6.  When a constant is directly assigned to a variable, it is called ………………… .
                    a.  Assignment                                  b.  Static Initialisation
                    c.  Dynamic Initialisation                      d.  None of these
                  7.  What type of operator "?:" is?
                    a.  Shift                                       b.  Bitwise
                    c.  Logical                                     d.  Ternary
                  8.  What character is preceded for every escape sequence?
                    a.  "\"                                         b.  "/"
                    c.  "\\"                                        d.  None of these
                  9.  What is the use of "\n"?
                    a.  Inserts a carriage return                   b.  Inserts a vertical tab
                    c.  Inserts a new line                          d.  None of these
                 10.  Which of the following is the other name of user-defined data type?
                    a.  Reference data type                         b.  Derived data type
                    c.  Primitive data type                         d.  Both a and b

                  Answers
                   1.  a     2.  d    3.  b     4.  c     5.  b     6.  b     7.  d     8.  a     9.  c     10.  d


              B.  Fill in the blanks:
                  1.  Tokens are the ………………… units of a Java program.
                  2.  There are ………………… different types of literals.

                  3.  ………………… literals represent null value in a string variable.
                  4.  “int a=6;” is an example of ………………… initialisation.
                  5.  A variable name should start with a/an ………………… .
                  6.  ………………… is used for the termination of a statement.
                  7.  These operators “&”, “|”, “^”, “~” are together known as ………………… .
                  8.  ………………… inserts a backslash character.
                  9.  The size of double data type is ………………… bytes or ………………… bits.
                 10.  A ………………… data type is a derived data type depending on some existing data types.

                  Answers
                  1.  fundamental      2.  six               3.  Null          4.  static           5.   alphabet
                  6.   Semicolon       7.  Bitwise operator   8.  \\               9.  8, 64       10.   user-defined


              C.  Answer the following questions.
                  1.  What is the requirement of the wrapper class?
                Ans.  Wrapper class is required to:
                    •  store the primitive data type in objects,
                    •  convert String to primitive data types and vice versa.




                114114  Touchpad Computer Science-XI
   111   112   113   114   115   116   117   118   119   120   121