Trending ▼   ResFinder  

ICSE Class X Prelims 2026 : Computer Applications

9 pages, 51 questions, 0 questions with responses, 0 total responses,    0    0
Rage Playz
  
+Fave Message
 Home > hkwk >

Formatting page ...

RANI LAXMIBAI GROUP OF PUBLIC SCHOOL PREBOARD EXAMINATION: 2025-26 CLASS X SUBJECT COMPUTER APPLICATION SET - B SECTION-A[40 Marks] Question 1: MCQs: 1. The advantages of user-defined methods are/is: i. Reusability ii. Complexity iii. Modularity (a) Only (i) (b) (ii) and (iii) (c) Only (iii) (d) (i) and (iii) Answer : (d) (i) and (iii) 2. Which of the following is a valid method prototype? (a) public int perform (int a;int b) (c) public perform (int a, int b) (b) public int perform (int a, int b) (d) public perform int (int a, int b) Answer : (b) public int perform (int a, int b). 3. Which data structure represented in a picture? i. A two dimensional array with 2 rows and seven columns. ii. A one dimensional array with 14 elements. a) Both (i) and (ii) b) only (i) c)only (ii) d)None of the (i) and (ii) Answer : b) only (i) 4. Consider the above pictures and choose the correct statement from the following: a) Vehicle is the object and the pictures are classes b) Both vehicles and the pictures are classes c) vehicles is the class and the pictures are objects d) both vehicles and pictures are objects Answer : vehicles is the class and the pictures are objects 5. Method that converts a character to uppercase is a) toUpper() b) ToUpperCase() c) toUppercase() Answer : b) ToUpperCase() Page 1 of 9 d)toUpperCase(char) 6. Corresponding wrapper class of float data type is a) FLOAT b)float c) Float d) Floating Answer : c) Float 7. The method to convert a String to double is: a) String.toDouble() b) Double.Parsedouble() c) Double.parseDouble(String) d) Double.parseDouble() Answer : (c) Double.parseDouble(String) 8. String a[ ]={ MI , SAMSUNG , MICROMAX , ONE PLUS , MOTOROLA }; Give the output of the following statement: System.out.println(a[3].replace( 0 , * )); a) *NE PLUS b) MICR*MAX c) M*T*R*LA d)MI Answer : a) *NE PLUS 9. Consider the array given below: char ch[ ]={ A , E , I , O , U } ; Write the output of following: System.out.println(ch[0]*2); a) 65 b) 130 c) A d)0 Answer : b) 130 10. Which among the following is a valid float literals? a)12.36f b)12.36F c)12.36 d) Both a and b Answer : d) Both a and b 11. Name the data types in order from top,given in the picture a) int,char,double,String c)String,int,char,double b) char,double,int,String d)int,double,char,String Answer : c)String,int,char,double 12. The expression which uses >= operator is known as: a)Relational b) logical c) arithmetic Answer : a)Relational 13. For x = 5, the statement sum = ++x + 8 evaluates to a) sum = 12 b)sum = 13 c) sum = 14 Answer : c) sum = 14 14. Given array int x[] = {11, 22, 33, 44}; the value of x[1+2] is a) 11 b) 22 c) 33 Answer : d) 44 Page 2 of 9 d) assignment d) sum = 15 d) 44 15. Output of the following statement is System.out.println("SUNDAY".substring(3)); a) NDA b) DAY c) SUN d)N Answer : b) DAY 16. Give the output of Math.pow(9,0.5)+Math.abs(-3.8) is __________. a) 4.8 b)0.8 c)7.0 d)6.8 Answer : d)6.8 17. What is the process of defining two or more methods within same class that have same name but different parameters declaration a) method overloading c) method overriding b) method hiding d) none of the mentioned Answer : a) method overloading 18. A constructor is used when an object is ___________. a) Created b) destroyed c) assigned a value d)abstracted Answer : a) Created 19. Assertion (A): Call by value is known as pure method. Reason (R): The original value of variable does not change as operation is performed on copied values. a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A) c) Assertion (A) is true and Reason (R) is false d) Assertion (A) is false and Reason (R) is true Answer : Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) 20. Assertion (A): An argument is a value that is passed to a method when it is called. Reason (R): Variables which are declared in a method prototype to receive values are called actual parameters. a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A) c) Assertion (A) is true and Reason (R) is false d) Assertion (A) is false and Reason (R) is true e) Answer : Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) Question 2: (i) what are library classes in java? what is their use? Library classes are the pre-written classes which are a part of the Java system. For example, the String and Scanner class. Java environment has a huge library of library classes that contain pre-defined methods to simplify the job of a programmer. These methods support input/output operations, String handling and help in development of network and graphical user interface. Page 3 of 9 (ii) State the difference between == operator and equals ( ) method. equals() == It is a method It is a relational operator It is used to check if the contents of two strings are same or not It is used to check if two variables refer to the same object in memory Example: String s1 = new String("hello"); String s2 = new String("hello"); boolean res = s1 == s2; System.out.println(res); Example: String s1 = new String("hello"); String s2 = new String("hello"); boolean res = s1.equals(s2); System.out.println(res); The output of this code snippet is true as contents of s1 and s2 are the same. The output of this code snippet is false as s1 and s2 point to different String objects. (iii) Rewrite the following program segment using the if-else statements instead of the ternary operator. String grade = (mark>=90) ? "A" : (mark>=80) ? "B" : "C"; String grade; if (mark>=90) grade='A'; else if (mark>=80) grade='B'; else grade='C'; (iv) Give the output of the following string functions: a) MISSISSIPPI .indexOf( S ) + MISSISSIPPI .lastIndexOf( I ) b) CABLE .compareTo( CADET ) Answer : a) 2+10+12 b) 66-68= -2 (v) Write the following as Java expression. a) 3+ 2 2 b) cos x + a2+b2 Answer : a) Math.cbrt(Math.abs(Math.pow(x,3)+ Math.pow(y,2)-2*x*y)); b) Math.cos(x)+Math.sqrt(a*a+bb*); Question 3: (i) Convert the following for loop statement into the corresponding while loop and do-while loop: int sum=0; for(int i=0;i<=50;i++) Page 4 of 9 sum=sum+i; Answer : WHILE LOOP int sum=0; int i=0; while(i<=50) { sum=sum + i; i++;} DO WHILE LOOP int sum=0; int i=0; do { sum=sum + i; i++;} while(i<=50); (ii) String x[ ] = { Artificial intelligence , IOT , Machine learning , Big data }; Give the output of the following statements: a) System.out.println(x[3]); b) System.out.println(x.length); Answer : a) Big data b) 4 (iii) Write a difference between unary and binary operator. Unary Operators Binary Operators It operates on a single operand It operates on two operands Increment (++) and Decrement (--) operators are examples of Unary Arithmetic Operators Multiplication (*) and Division (/) are examples of Binary Arithmetic Operators (iv) Give the output of the following code : String P = 20 , Q = 19 ; int a = Integer.parselnt(P); int b = Integer.valueOf(Q); System.out.println(a+ +b); Answer : 2019 (v) State a difference between call by value and call by reference. Call by value Call by reference Actual parameters are copied to formal parameters. Formal parameters refer to actual parameters. Any changes to formal parameters are not reflected onto the actual parameters. The changes to formal parameters are reflected onto the actual parameters. All primitive data types are passed using Call by value. All reference data types like arrays and objects of classes are passed using Call by reference. Page 5 of 9 It is used to keep original data secure and unchanged. It is used when the original data values need to be modified. Q4 A Private cab service company provides . ANSWER import java.util.Scanner; public class CabService { String car_type; double km; double bill; public CabService() { car_type = ""; km = 0.0; bill = 0.0; } public void accept() { Scanner in = new Scanner(System.in); System.out.print("Enter car type: "); car_type = in.nextLine(); System.out.print("Enter kilometer: "); km = in.nextDouble(); } public void calculate() { if (km <= 5) { if (car_type.equals("AC")) bill = 150; else bill = 120; } else { if (car_type.equals("AC")) bill = 150 + 10 * (km - 5); else bill = 120 + 8 * (km - 5); } } public void display() { System.out.println("Car Type: " + car_type); System.out.println("Kilometer Travelled: " + km); System.out.println("Total Bill: " + bill); } Page 6 of 9 public static void main(String args[]) { CabService obj = new CabService(); obj.accept(); obj.calculate(); obj.display(); } } Q5 design a class to overload series() . Q6. Write a menu driven program .. import java.util.Scanner; public class KboatMenu { public static void main(String args[]) { Scanner in = new Scanner(System.in); System.out.println("Type 1 for Value of c"); System.out.println("Type 2 for pattern"); System.out.print("Enter your choice: "); int choice = in.nextInt(); Page 7 of 9 switch (choice) { case 1: final double b = 3.0; for (int a = 1; a <= 20; a += 2) { double c = Math.pow(a, 2) + 2 * a * b; System.out.println("Value of c when a is " + a + " = " + c); } break; case 2: for (char i = 'A'; i <= 'E'; i++) { for (char j = 'A'; j <= i; j++) { System.out.print(j); } System.out.println(); } break; default: System.out.println("INVALID CHOICE"); } } } Q8. Write a program to accept string .. import java.util.Scanner; public class KboatLetterSeq { public static void main(String args[]) { Scanner in = new Scanner(System.in); System.out.print("Enter string: "); String s = in.nextLine(); String str = s.toUpperCase(); int count = 0; int len = str.length(); for (int i = 0; i < len - 1; i++) { if (str.charAt(i) == str.charAt(i + 1)) count++; } Page 8 of 9 System.out.println("Double Letter Sequence Count = " + count); } } Q9. Binary search import java.util.Scanner; public class KboatBinarySearch { public static void main(String args[]) { Scanner in = new Scanner(System.in); int arr[] = {5, 7, 9, 11, 15, 20, 30, 45, 89, 97}; System.out.print("Enter number to search: "); int n = in.nextInt(); int l = 0, h = arr.length - 1, index = -1; while (l <= h) { int m = (l + h) / 2; if (arr[m] < n) l = m + 1; else if (arr[m] > n) h = m - 1; else { index = m; break; } } if (index == -1) { System.out.println("Search element not found"); } else { System.out.println(n + " found at position " + index); } } } Page 9 of 9

Formatting page ...

Related ResPapers
ICSE Class X Prelims 2025 : Computer Applications (Gopalan National School (GNS), Bangalore)
by mv101 
ICSE Class X Prelims 2025 : Computer Applications (Karnataka ICSE Schools Association KISA, Bengaluru)
by varenya_s 
ICSE Class X Prelims 2025 : Computer Applications (Dhirubhai Ambani International School (DAIS), Mumbai)
by khushdjogi 
ICSE Class X Prelims 2025 : Computer Applications (St. Augustine's Day School, Kolkata)
by hiiuo 

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 


© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

hkwk chat