Formatting page ...
Class : X Date- 30 /11/ 2020 Kimmins High School, Panchgani. Sub: Computer Applications MOCK EXAMINATION Time: 2 Hrs. Marks: 100 Attempt all questions of Section A and any 4 questions of Section B. Section A (40 Marks) Q.1 ] a) What is meant by dynamic initialization? Give an example. [10] b) Name the keyword: (i) is used to provide a block of code that is always performed regardless of whether an exception is signaled or not. (ii) means anyone can call this method. c) Differentiate between keywords and identifiers. d) Differentiate between equals( ) and compareTo( ) . e) Differentiate between default and parameterized constructor . Q.2 ] a) Write a code to check whether a number is odd or even using switch case. b) Write the java expression for: ( x ) b + x b c) State the output of the following: Given int a = 10, b=20; System.out.println( + a + b); System.out.println( a + b); d) (i) What is the return value of hasNext( ) function? [10] (ii) Name the default delimiter used to separate tokens in a scanner object. e) Arrange the following data types in descending order of their size: int, char, boolean and double . Q.3] a) Differentiate between base type and subscript type of an array. [2] b) Rewrite the following using if else switch( b ) { case 8: case 12: H = 4; break; case 11: case 77: H = 7; break; default: H = 1; } c) State the output : int y[ ] = {2, 4, 5, 8}; [2] for( int j= 0; j<y.length; j++) { int p= y[ j ] +y[3 j ]; System.out.println( p ); } [2]
|