ICSE Class 10 Computer Applications
Previous Years Board Based Comprehensive Model Assessment Test
Section A: Previous Years Multiple Choice Questions (50 Marks)
1. The feature of Object-Oriented Programming that binds together data and functions into a single unit is called:
2. Which package is imported by default in every Java program?
3. The process by which one class acquires the properties and methods of another class is known as:
4. Which method converts a string representation of a decimal number to a double data type?
5. Parameters that receive values from the calling method in a method definition header are called:
6. What is the return type of the String method compareTo()?
7. What is the wrapper class corresponding to the primitive data type char?
8. Evaluating Math.floor(-7.6) returns which double value?
9. Accessing an array index equal to its length (i.e. arr[arr.length]) results in:
10. Which keyword is used to allocate memory dynamically for objects and arrays in Java?
11. What is the output of "COMPUTER".substring(2, 5)?
12. A constructor having the same name as the class and no return type is invoked when:
13. Which method removes whitespace from both leading and trailing ends of a String?
14. What value is returned by Math.ceil(4.2)?
15. What is the size of int primitive data type in memory in Java?
16. Which Scanner class method reads a single 10-digit mobile number integer safely into memory?
17. Which operator is used for conditional decision making taking three operands?
18. What is the value of Character.isUpperCase('a')?
19. What is the range of numbers generated by expression (int)(Math.random() * 10) + 1?
20. Combining functions having the same name but different argument lists inside a single class is called:
21. Automatic conversion of a primitive data type to its corresponding wrapper object is called:
22. Which search algorithm requires array elements to be strictly sorted prior to searching?
23. What is the value of "ICSE".charAt(3)?
24. Which keyword makes a variable constant whose value cannot be modified during execution?
25. What is the default value of a boolean instance variable in Java?
26. Hiding low-level implementation details and displaying only essential features is called:
27. What is the output of Math.abs(-12.8)?
28. Which sorting technique repeatedly compares adjacent array elements and swaps them if in wrong order?
29. Which keyword refers to the current invoking instance of a class inside a method?
30. What intermediate bytecode format is produced by the Java compiler (javac)?
31. The method equalsIgnoreCase() returns true when comparing two strings if:
32. What is the ASCII value of uppercase letter 'A'?
33. What is the ASCII value of lowercase letter 'a'?
34. Which loop is classified as an entry-controlled loop?
35. Which loop is classified as an exit-controlled loop?
36. What is the output of Integer.parseInt("100") + 50?
37. What is the value of Math.pow(3, 2)?
38. What is the return type of expression a > b where a and b are integers?
39. What is the result of explicit casting (int) 8.95?
40. What is the keyword used by a subclass to call a constructor of its superclass?
41. What is the value of "PROGRAM".indexOf('G')?
42. Which method converts primitive char digit into integer value (e.g., '7' to 7)?
43. What statement terminates a loop immediately and transfers control out of the loop block?
44. Which statement skips the remaining code inside current iteration and moves to next loop cycle?
45. An array declared as int m[][] = new int[4][5] contains how many total elements?
46. What is the output of expression 14 % 5?
47. Which method converts all characters in a string to uppercase letters?
48. Variables declared inside a method block are termed as:
49. What is the value of Math.min(15, 25)?
50. What is the return value of "Apple".compareTo("Apple")?
Section B: Board Pattern Assertion & Reasoning Questions (20 Marks)
Directions: Choose the correct option:
- A: Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion (A).
- B: Both Assertion (A) and Reason (R) are true, but Reason (R) is NOT the correct explanation of Assertion (A).
- C: Assertion (A) is true, but Reason (R) is false.
- D: Assertion (A) is false, but Reason (R) is true.
51. Assertion (A): Java is platform-independent due to its "Write Once, Run Anywhere" (WORA) feature.
Reason (R): Java compiler converts source code into Bytecode which runs on any JVM platform.
52. Assertion (A): Inheritance promotes code reusability.
Reason (R): Subclass inherits state and behavior from superclass without rewriting methods.
53. Assertion (A): Abstraction exposes full internal working details of an object.
Reason (R): Abstraction allows focusing on what an object does rather than how it does it.
54. Assertion (A): The this keyword refers to the current invoking instance of a class.
Reason (R): It resolves naming conflicts between instance variables and formal parameters.
55. Assertion (A): Binary Search can be applied on any randomly unsorted array.
Reason (R): Binary Search works by repeatedly dividing search space in half based on sorted order comparisons.
56. Assertion (A): Math.random() generates a double value between 0.0 and 1.0.
Reason (R): It includes 0.0 but excludes 1.0 in its return range.
57. Assertion (A): Constructors do not specify a return type, not even void.
Reason (R): Constructors implicitly return the instance created when invoked with new.
58. Assertion (A): Wrapper classes convert primitive types into corresponding objects.
Reason (R): They are contained inside the default java.lang package.
59. Assertion (A): An infinite loop occurs if termination condition never becomes false.
Reason (R): Proper increment/decrement management of loop variables is necessary to ensure exit.
60. Assertion (A): String objects in Java are mutable.
Reason (R): Methods like concat() modify the original String object in memory.
61. Assertion (A): The relational equal operator == compares values in primitive types.
Reason (R): When applied to Object references, == compares memory locations.
62. Assertion (A): Method Overloading is an example of compile-time polymorphism.
Reason (R): Method call binding is resolved at compile time based on parameter signatures.
63. Assertion (A): System.out.println() prints text and moves cursor to a new line.
Reason (R): Method print() retains cursor on the same output line.
64. Assertion (A): An array index in Java always starts at index 0.
Reason (R): Array index represents offset distance from starting memory location of array.
65. Assertion (A): switch statement controls multi-way branching.
Reason (R): break statement prevents execution fall-through to lower cases.
66. Assertion (A): double data type occupies 64 bits in memory.
Reason (R): Double precision floating point numbers conform to IEEE 754 standard representation.
67. Assertion (A): Private members of a class can be accessed directly from any external class.
Reason (R): Private access modifier enforces strict encapsulation.
68. Assertion (A): do-while loop guarantees at least one execution pass.
Reason (R): Test condition is evaluated at the end of the loop body (exit-controlled).
69. Assertion (A): Scanner class handles formatted console data input.
Reason (R): It belongs to java.util package.
70. Assertion (A): trim() method removes spaces present inside between words.
Reason (R): trim() removes spaces solely from the start and end of a string.
Section C: Visual Code & Output Based Questions (10 Marks)
71. Observe Code Snippet:
int a = 5;
System.out.println(++a + a++);
What output prints to screen?
72. Identify Output from Code Layout:
String str = "EXAMINATION";
System.out.println(str.indexOf('A') + " " + str.lastIndexOf('A'));
73. Look at Array Execution Diagram:
int x[] = {10, 20, 30, 40, 50};
System.out.println(x[1] + x[3]);
74. Observe Snippet Layout:
char ch = 'B';
int val = ch + 3;
System.out.println((char)val);
75. Identify Output from Ternary Operation:
int x = 10, y = 20;
int max = (x > y) ? x : y;
System.out.println(max);
76. Look at Math Expression:
double d = Math.sqrt(Math.abs(-16));
System.out.println(d);
77. Identify String Method Result:
String s1 = "JAVA";
String s2 = "java";
System.out.println(s1.equals(s2) + " " + s1.equalsIgnoreCase(s2));
78. Observe Loop Output Layout:
int count = 0;
for(int i=1; i<=10; i+=3) { count++; }
System.out.println(count);
79. Identify Method Prototype Statement:
int display(int a, char ch)
Which statement represents a valid method invocation?
80. Observe Type Conversion Code:
String p = "10"; String q = "20";
int x = Integer.parseInt(p); int y = Integer.parseInt(q);
System.out.println(p + q + " and " + (x + y));
No comments:
Post a Comment