Trending ▼   ResFinder  

ICSE Class X Prelims 2025 : Computer Applications (Unison World School (UWS), Dehradun)

9 pages, 96 questions, 0 questions with responses, 0 total responses,    0    0
amritapandey
  
+Fave Message
 Home > amritapandey >   F Also featured on: School Page

Formatting page ...

Second Preboard Examination /Grade X / 24th Jan, 2024/Wednesday/ Computer Applications /Morning ________________________________________________________________________________ Time Limit: 2 hours MM: 100 Amrita Pandey - 10 Instructions This paper is divided into two sections Attempt all questions from Section: A and any four questions from Section: B. The intended marks for questions or parts of questions are given in brackets [ ]. SECTION A (Attempt all questions from this Section.) Question 1 Choose the correct answers to the questions from the given options. (Do not copy the question, write the correct answers only.) (i) Name the feature of java depicted in the above picture. (a) Encapsulation (b) Inheritance (c) Abstraction (d) Polymorphism (ii) The operator with least precedence is (a) Increment operator (b) Assignment Operator (c) Logical operator (d) Relational Operator (iii) The operator which is used to create an object This Paper consists of 6 printed pages [20] (a) int (b) (type) (c) dot (d) new (iv) What is needed to declare a variable? (a) return type (b) data type (c) class (d) access specifier (v) Pick out the wrong declaration of the array from the following (a) int []a=new int(size) (b) char c[]=new char[size] (c) float [] t= new float[10] (d) byte d[]=new byte[15] (vi) The expression 4+5*7/2; gives the output (a) 22 (b) 19 (c) 21 (d) 21.5 (vii) In switch-case Fall through occurs when the ---------------- statement is missing. (a) break (b) default (c) continue (d) switch (viii) The output of Math.pow(Math.ceil(4.22),Math.cbrt(8)); (a) 11 (b) 11.0 (c) 25.0 (d) 25 (ix) Name the type of error, if any in the following statement: if( a>b , a>c) (a) logical (b) no error (c) runtime (d) syntax (x) Java statement to access second last character of a string s is (a) s.charAt(2) (b) s.charAt(s.length()-1) (c) s.charAt(s.length()-2) (d)s.charAt(1) (xi) The output of class Main { public static void main(String[] args) { int number = 44; String size; This Paper consists of 6 printed pages switch (number) { case 29: size = "Small";case 42: size = "Medium";break; case 44: case 48: size = "Large"; size = "Extra Large"; break; default: size = "Unknown"; } System.out.println("Size: " + size); }} (a) Large (b) Extra Large (c) Large Extra Large (d) Unknown (xii) The type of invoking possible in the function Class check(Class P) is (a) call by reference (b) class by value (c) actual call (d) formal call (xiii) A local variable in a function has its scope: (a) Limited within the function (b) can be accessed anywhere (c) Limited within the class (d) No limitation at all (xiv) If the name of a class is Number , what can be the possible name for its constructor? (a) Cons Number (b) Number (c) void Number (d) Number Constructor This Paper consists of 6 printed pages This Paper consists of 7 printed pages (xv) S=Integer.toString(20)+Long.toString(23), what is the value stored in the variable S? (a) 2023 (b) 43 (c) 2023 (d) Error (xvi) The array double a[3] occupies (a) 3 bytes (b)11 bytes (c)3.0 bytes (d)24 bytes (xvii) Assertion(A): Character.isLetter() function is used to check whether a given argument is a letter or not. Reason(R): It returns an integer value, either 1 or 0. (a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correctexplanation of Assertion (A) (b)Both Assertion (A) and Reason (R) are true and Reason (R) is not a correctexplanation of Assertion(A) (c) Assertion (A) is true and Reason (R) is false (d) Assertion (A) is false and Reason (R) is true (xviii) Read the following text, and choose the correct answer: The actual parameter is copied to the formal parameter in such a way that any changemade in the formal parameter does not affect the actual parameter. Which of the following options discusses the above mentioned statement? (a) call by reference (b)call by value (c) Methods (d) constructors (xix) Assertion(A): An array is used to store multiple values of different data types under thesame variable name. Reason(R): An array is an example for reference datatype. (a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correctexplanation of Assertion (A) (b) Both Assertion (A) and Reason (R) are true and Reason (R) is not acorrect explanation of Assertion (A) (c) Assertion (A) is true and Reason (R) is false (d) Assertion (A) is false and Reason (R) is true (xx) What will be the output for: System.out.print( Prepare .substring(0,3).concat( board Examination ); (a) Prepare board Examination (b) Preboard Examination (c) Prepboard Examination (d) Pre board Examination This Paper consists of 7 printed pages Question 2 (i) Write the Java expression for [2] (ii) Evaluate the expression when the value of y=10 [2] = a2 + b20 Z=(++y*(y++ +5)); (iii) The following code segment should print the cube of num . However, the code has errors.Fix the code so that it compiles and runs correctly. public class Type { public int getDouble(double num) { double Value = Math.cbrt(8); System.out.println(Value); } public static void main() { System.out.println("Cube of number = " + getDouble(5)); } } [2] (iv) Sheetal executes the following program segment and an error is displayed irrespective ofthe statements being written properly. Name the error. How the program can be modifiedto get the correct answer? [2] void array() { int a[]={4,6,8,10,12,14,16}; for(int i=0;i<=a.length();i++) { System.out.println(a[7]); } } (v) Name the data type and the value returned by the following functions. a. Math.sqrt(16) b. COMIC .compareTo( COMET ); [2] (vi) Predict the output [show the dry run/working] [2] int a=0,i=4; while(i<10) a+=++i*2; System.out.println( a= +a+ \n i= +i); (vii) Name the methods a. To find the size of the array. b. To extract characters from a string. [2] (viii) Predict the output of the following code snippet: [2] a. b. c. d. String s= Indian Cricket Council ; s.length(); s.replace( Council , Board ); s.substring(16,19); s.endsWith( il ); (ix) Write a java statement to assign all vowels to an array vowel. This Paper consists of 7 printed pages [2] (x) String s[]={ India , Australia , Srilanka , Singapore , Japan }; a. Write java statement to display the first element of a given array. b. Write the output for s[3].substring(0,4). [2] SECTION B(60 MARKS) Attempt any four questions from this Section. The answers in this Section should consist of the Programs in either BlueJ environment or any program environment with Java as the base. Flow-Charts and Algorithms are not required. Question 3 [15] Design a class HotelBooking with following description: Instance variables/data members: String name To store the name of the customer String room To store the type of room customer wants to booklong mobno To store customer s mobile number double amt To store basic room tariff double totalamt To store the amount to be paid after updating the original amount Member methods: HotelBooking(): default constructor to initialise data members with default values.void accept() To take input for name, room, mobile number and amount. void update() To update the amount as per the room selected (extra amount to be added in the amount as follows) Type of Rooms Amount Suite 5000 Super_Deluxe 2000 Deluxe 1000 Standard 500 void display() To display all details of a customer such as name, room type, total amount and mobile number. Write a main method to create an object of the class and call the above member methods. Question 4 Write a program to declare a character array of size 10 and initialize the array with the following characters { 9 ,'L', 'M','O','Q','Z', b , d , f , g } in an array. Search for a character given by the user as an input using Binary search. If the character is present, print its position otherwise print "character not present" [15] Question 5 WAP to input a sentence containing uppercase, lowercase, symbols, digits and separated by a single blank space. Display the original sentence. Form a new sentence by replacing all uppercase letters by their ASCII values, lower case letters by uppercase letters, blank space by $ , digits by # and symbols by the lowercase letter x INPUT BlueJ Version 5.0.2 for Windows10@ JDK 9!!! OUTPUT 66LUE74$86ERSION$#x#x#$FOR$87INDOWS##x$$746875$#xxx This Paper consists of 7 printed pages Question 6 [1 5] Design a class TwoDArray to accept values into a 4x4 array with double values. Display the original array in matrix form. Check and display whether it is a perfect array or not with proper message. An array is said to be perfect array if the integer part of sum of the elements gives an even number. Example: Q[][]={{1.2,3.4,5.6,2.3},{6.9,5.8,4.5,3.3},{7.123,6.32,4.87,6.19},{5.0,4.3,8.66,9.12}} Sum of the elements=84.583, integer part=84, so the above given array is a perfect array Question 7 [1 5] Write a program to accept a number and check and display whether it is a Strontio number or not. Strontio numbers are those four digits numbers when multiplied by 2 give the same digit at the hundreds and tens place. Remember that the input number must be a four-digit number. Strontio Number Example: 1386*2=2772, we observe that at tens and hundreds place digits are the same. Hence, 1386 is a strontio number. 1221*2=2442, digits at tens and hundreds place are the same Hence, 1221 is a strontio number. Question 8 Design a class to overload a function show() as follows void show(): to print the following pattern 65 66 67 68 69 70 71 72 73 74 void show(int p): To print the prime digits present in the given number Example: p=4329 Output: 2, 3 void show(String s): to print the following pattern B BL BL UB LU E BLUEJ If the string s=BLUEJ Write a main method, create object and call the above functions. This Paper consists of 7 printed pages [15] x-----All the Best-----x This Paper consists of 7 printed pages

Formatting page ...

Related ResPapers
ICSE Class X Prelims 2025 : Computer Applications (Vidyasagar Shishu Niketan (VSN), West Medinipur)
by ddey 
ICSE Class X Prelims 2025 : Computer Applications (Unison World School (UWS), Dehradun)
by amritapandey 
ICSE Class X Prelims 2025 : Computer Applications (Sri Sri Academy (SSA), Kolkata)
by priyansh08 
ICSE Class X Prelims 2025 : Computer Applications (Queen of Angels Convent Higher Secondary School (QACS), Vadadla, Bharuch)
by ghostttt 

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

 

amritapandey chat