Trending ▼   ResFinder  

ICSE Class X Mid-term 2023 : Computer Applications

40 pages, 160 questions, 0 questions with responses, 0 total responses,    0    0
Soumil Jaiswal
Ebenezer International School (EISB), Bangalore
grade 10
+Fave Message
 Home > soumilenglang31 >

Formatting page ...

PREFACE With a growing emphasis on competency-based education globally, the educational landscape in India has also steered towards high-quality learning experiences that allow learners to incorporate critical thinking and problem-solving approaches. This approach goes beyond rote memorisation and focuses on developing the skills and knowledge that students need to apply in their real-world scenarios. The Council for the Indian School Certificate Examinations (CISCE), as a national-level progressive examination board, has taken several steps to infuse competency-based education in CISCE schools through teacher capacity-building on item development for competency-based assessments and the incorporation of competency-focused questions at the ICSE and ISC levels from the examination year 2024. To further facilitate the adoption of competency-based assessment practices in schools and to support teachers and students towards the preparation for attempting higher-order thinking questions in future board examinations, Item Banks of Competency-Focused Practice Questions for selected subjects at the ICSE and ISC levels have been developed. This Item Bank consists of a rich variety of questions, both objective and subjective in categories, aimed at enhancing the subject-specific critical and analytical thinking skills of the students. In this Item Bank, each question is accompanied by the topic and cognitive learning domain/s that it intends to capture. The cognitive domains reflected in these questions include understanding, analysis, application, evaluation and creativity, along with some questions of the higher-order recall domain. The Answer Key at the end presents the possible answers to a given question, but it is neither limiting nor exhaustive. These practice questions are also meant to serve as teacher resources for classroom assignments and as samplers to develop their own repository of competency-focused questions. Apart from offering a good practice of higher-order thinking skills, engaging with these questions would allow students to gauge their own subject competencies and use these assessments for learning to develop individual learning pathways. During the development of this Item Bank, a large pool of questions was prepared by a team of experienced CISCE teachers. The questions that were finalised by the internal and external reviewers as being higher-order competency-focused questions have been collated in this item bank. I acknowledge and appreciate all the ICSE and the ISC subject matter experts who have contributed to the development and review of these high-quality competency-focused questions for CISCE students. We are hopeful that teachers and students will utilise these questions to support their teaching-learning processes. September 2024 Dr. Joseph Emmanuel Chief Executive & Secretary CISCE ICSE Class X Computer Applications Table of Contents S.No Type of Questions Page No. I. Multiple-Choice Questions (MCQs) 2-14 II. Very Short Answer Questions 14-19 III. Long Answer Questions 20-23 Answer Key ICSE Competency-Focused Practice Questions 24-37 1 ICSE Class X Computer Applications COMPETENCY-FOCUSED PRACTICE QUESTIONS ICSE - CLASS X Computer Applications I: Multiple Choice Questions (1 mark) S.No 1. Questions [User Defined Methods] What is the type of error, if any, when two methods have the same method signature? (a) (b) (c) (d) 2. Runtime error Logical error Syntax error No error [Understanding] [User Defined Methods] The advantage/s of user-defined methods are/is: (i) Reusability (ii) Complexity (iii) Modularity (a) (b) (c) (d) 3. Only (i) (ii) and (iiii) Only (iiii) (i) and (iii) [Understanding] [User Defined Methods] Parameters which receive the values from the called method are termed as _______ parameters. (a) (b) (c) (d) actual formal reference class ICSE Competency-Focused Practice Questions [Understanding] 2 ICSE Class X Computer Applications S.No 4. Questions [User Defined Methods] Which of the following is a valid method prototype? (a) (b) (c) (d) 5. public int perform (int a;int b) public perform (int a, int b) public int perform (int a, int b) public perform int (int a, int b) [Analysis] [User Defined Methods] Which of the following is the CORRECT statement to invoke the method with the prototype int display(int a, char ch)? (a) (b) (c) (d) 6. int m = display( A , 45); int m = display( ); int m = display(A,45); int m = display(45, A ); [Analysis] [String handling] Which of the following is the CORRECT java statement to convert the word RESPECT to lowercase? (a) (b) (c) (d) 7. RESPECT . tolowercase( ); RESPECT .toLowerCase( ); toLowerCase( RESPECT ); String. toLowerCase( RESPECT ); [Analysis] [Library Classes] Which of the following are Wrapper classes? 8. (i) (ii) (iii) (iv) Boolean boolean character Character (a) (b) (c) (d) (i) and ((iv) (ii) and (iv) (i) and (iii) (ii) and (iii) [Understanding] [Library Classes] Conversion of a wrapper class to its corresponding primitive type is known as : (a) (b) (c) (d) unboxing autoboxing type casting parsing ICSE Competency-Focused Practice Questions [Understanding] 3 ICSE Class X Computer Applications S.No 9. Questions [String Handling] The String method, which results only in a positive integer, is : (a) (b) (c) (d) 10. indexOf lastIndexOf compareTo length [Understanding] [Library Classes] The method to convert a String to double is: (a) (b) (c) (d) 11. String. toDouble() Double. Parsedouble() Double. parseDouble(String) Double. parseDouble( ) [Understanding] [Arrays] The java statement System. out. println(x[x. length]) results in: (a) (b) (c) (d) 12. logical error syntax error run time error no error [Analysis] [Arrays] Which of the following is a valid array declaration statement to store the Gender of 80 employees [ M -male, F -female, T -transgender ]? (a) (b) (c) (d) 13. char gender = new char[80]; char gender[] = new char[80]; char gender[80]; char gender[80] = new char[ ]; [Analysis] [Arrays] Arrange the following java statements in the correct order of execution to accept values into the array a[]: (i) a[i]=sc. nextInt( ); (ii) int a[]=new int[10]; (iii) Scanner sc=new Scanner(System. in); (iv) for(i=0;i<10;i++) (a) (b) (c) (d) (i), (ii), (iii), (iv) (ii), (iii), (iv), (i) (iv), (iii), (ii), (i) (iii), (i), (iv), (ii) ICSE Competency-Focused Practice Questions [Analysis] 4 ICSE Class X Computer Applications S.No 14. Questions [Arrays] In the bubble sort technique, during each iteration of the inner loop, two adjacent elements are __________and __________. (i) compared (ii) swapped (iii) selected (iv) deleted (a) (b) (c) (d) 15. (i) and (ii) (ii) and (iii) (iii) and (iv) (ii) and (iv) [Understanding] [Arrays] What is the highest index of any array with 100 elements? (a) (b) (c) (d) 16. 100 101 99 98 [Recall] [User Defined Methods] Mr. Sanjay is an event manager, he plans and allots duties to each of his subordinates to handle different events. In a program, a task is divided into simple methods. Name the feature used in these contexts. (a) (b) (c) (d) 17. Complexity Modularity Reusability Monolithic [Understanding & Analysis] [Input in Java] Raj was asked to accept the phone number which has 10 digits, using the appropriate method of Scanner class. Which of the following statement he must choose? (a) (b) (c) (d) 18. Ob. nextInt() Ob. nextDouble() Ob. nextLong() Ob. next().chatAt(0) [Analysis] [String Handling] Raj wanted to count the number of digits in a given number without using a loop. Which of the following statements is correct to perform the above? (a) (b) (c) (d) String.valueOf(n).length() Integer.parseInt(n).length() n.length() All the above ICSE Competency-Focused Practice Questions [Analysis] 5 ICSE Class X Computer Applications S.No 19. Questions [String Handling] Sham was asked to encode a string S, by replacing the letter E with #. Select the appropriate statement: (a) (b) (c) (d) 20. S.replace( # , E ) S. replace( E ) S. replace( E , # ) S. replace( # ) [Analysis] [String Handling] When the String m is compared to n , the result obtained is greater than zero. Which of the following is true? (a) (b) (c) (d) m comes before n in the dictionary. n comes before m in the dictionary. m and n are equal. m and n have the same length. [Analysis] 21 [String Handling] Which of the following String methods has integer argument? (i) length (ii) substring (iii) indexOf (iv) charAt (a) (b) (c) (d) 22. Only (ii) (i) and (iv) (ii) and (iv) (iii) and (iii) [Analysis] [Introduction to Object-Oriented Programming Concepts] Assertion: Property by virtue of which one class acquires the properties of another class is termed as Inheritance. Reason: Inheritance promotes reusability. (a) (b) (c) (d) 23. Assertion is true, Reason is false. Assertion is true, Reason is true. Assertion is false, Reason is false. Assertion is false, Reason is true. [Understanding] [User Defined Methods] Which of the following is NOT true for polymorphism? (a) (b) (c) (d) All methods have the same name. Methods are invoked based on the arguments. Methods should have the same number and the same type of arguments. It is a principle of OOPs. [Analysis] ICSE Competency-Focused Practice Questions 6 ICSE Class X Computer Applications S.No 24. Questions [Values and Datatypes] Which of the following is a valid initialisation statement? (a) (b) (c) (d) 25. int x = GOOD ; int y = 45.0/2; int z=(int) x ; int m = false ; [Analysis] [Values and Datatypes] Which of the following is a valid statement to print the following sentence: Raj said Good morning (a) (b) (c) (d) 26. System. out. println( Raj said Good morning ); System. out. println( Raj said \\Good morning\\); System. out. println( Raj said \"Good morning\" ); System. out. println( Raj said Good morning ); [Analysis] [Arrays] Which data structure is represented in the above picture? (i) A two-dimensional array with 2 rows and seven columns. (ii) A one-dimensional array with 14 elements. (a) (b) (c) (d) Both (i) and (ii) Only (i) Only (ii) None of the (i) and (ii) ICSE Competency-Focused Practice Questions [Application & Analysis] 7 ICSE Class X Computer Applications S.No 27. Questions [Iterative Constructs in Java] What is the type of looping statement depicted in the above picture? (a) (b) (c) (d) 28. Entry controlled loop Exit controlled loop Multiple branching statement All the above. [Understanding & Application] [Arrays] What is the process done in the above picture? (a) (b) (c) (d) Sorting the list in descending order Searching the character in the list Sorting the list in ascending order. None of the above. ICSE Competency-Focused Practice Questions [Understanding & Application] 8 ICSE Class X Computer Applications S.No 29. Questions [Arrays] Name the method of search depicted in the above picture. (a) (b) (c) (d) 30. Binary Search Selection Sort Bubble Sort Linear Search [Understanding & Application] [User Defined Methods] Name the feature of Java depicted in the above picture. (a) (b) (c) (d) Encapsulation Inheritance Polymorphism Data abstraction ICSE Competency-Focused Practice Questions [Recall & Understanding] 9 ICSE Class X Computer Applications S.No 31. Questions [Values and Datatypes] Name the data types in order from top, given in the above picture. (a) (b) (c) (d) 32. int, char, double, String String, int, char, double char, double, int, String int, double, char, String [Understanding] [Arrays] How many bytes are occupied by the above two-dimensional array? (a) (b) (c) (d) 33. 96 bytes 128 bytes 12 bytes 24 bytes [Understanding] [Java Expressions] A girl wanted to calculate the sum of two numbers stored as a and b multiplied by 7. Select the appropriate Java expression. (a) (b) (c) (d) a+b*7 7*a+b (a+b)*7 a+7*b ICSE Competency-Focused Practice Questions [Analysis] 10 ICSE Class X Computer Applications S.No 34. Questions [Arrays] The sum of a[1] and a[3] in the array int a[]={20,40,60,80,100} is: (a) (b) (c) (d) 35. 80 100 120 60 [Evaluate] [Encapsulation] State which access specifier is less restrictive. (a) (b) (c) (d) 36. private protected default public [Recall] [Mathematical Library Methods] The AMB hotel gives the amount to be paid by the customer as an integer, which of the following Math method rounds off the bill in decimals to an integer? (a) (b) (c) (d) Math.round() Math.pow() Math.ceil() Math.abs() ICSE Competency-Focused Practice Questions [Recall & Understanding] 11 ICSE Class X Computer Applications S.No 37. Questions [Iterative Constructs in Java] Identify which of the following leads to an infinite loop. (a) (b) (c) (d) 38. for(i=10;i!=0;i- -) for(i=3;i<=30;i+=3) for(i=1;i>=1;i++) for(i=1;i>=0;i- -) [Analysis] [Constructors] Assertion: A class can have multiple constructors Reason: Multiple constructors are defined with same set of arguments. (a) (b) (c) (d) 39. Assertion is true, Reason is false. Both assertion and Reason are false. Both assertion and Reason are true. Assertion is false, Reason is true. [Understanding & Analysis] [Arrays] Assertion: An array can store elements of different data types Reason: An array is a user-defined data type with multiple values of the same data type but a different memory index. (a) (b) (c) (d) 40. Assertion is true, Reason is false. Both Assertion and Reason are false. Both Assertion and Reason are true. Assertion is false, Reason is true. [Analysis] [Values and Datatypes] Which of the following statement is an example for explicit typecasting? (a) (b) (c) (d) 41. int amount = 45; int amount = 24*24;; int amount = Integer.parseInt ( 45 ); int amount = int (45.75); [Analysis] [Mathematical Library Methods] The output of the statement Math.ceil. (89.9)+Math.floor(90.5) is: (a) (b) (c) (d) 0.0 180 180.0 180.4 ICSE Competency-Focused Practice Questions [Analysis] 12 ICSE Class X Computer Applications S.No 42. Questions [String Handling] The output of the statement of TIGER . indexOf( G ) is: (a) (b) (c) (d) 43. 3 2 -1 0 [Understanding] [Conditional Constructs in Java] Choose the statement which is equivalent to the given: if(a>b) System.out. println( Honest ); else System.out.println( Sincere ); (a) (b) (c) (d) 44. a>b? System.out. println( Honest ):System.out.println( Sincere ); System.out.println(a>b? Honest : Sincere ); a>b? Honest : Sincere ; a>b: Honest ? Sincere ; [Understanding] [String Handling] The two Java statement are used to check for the equality of the strings COP and cop are as follows: COP . equals( cop ) COP . equalsIgnoreCase( cop ) The output of the above statements is: (a) (b) (c) (d) 45. false, true true, false false, false true, true [Understanding] [String Handling] The output of the java statement SOLDIER . compareTo( SOLUTE ); is (a) (b) (c) (d) -4 -17 17 0 ICSE Competency-Focused Practice Questions [Application] 13 ICSE Class X Computer Applications S.No 46 Questions [Arrays] Arrange the following in the descending order of number of bytes occupied. (i) char x[20] (ii) int a[4][2] (iii) double b[6] (a) (b) (c) (d) 47. (iii), (ii), (i) (iii), (i), (ii) (ii), (iii), (i) (i), (ii), (iii) [Analysis] [Arrays] Sam performs bubble sort on the following array to organise the elements in ascending order: {5,1,2,3} After the first comparison the array is: {1,5,2,3} What would be the array after the next comparison? (a) (b) (c) (d) {1,2,5,3} {1,5,3,2} {1,3,5,2} {1,3,2,5} [Understanding & Analysis] Very Short Answer Questions (2 marks) S.No 48 Questions [Mathematical Library Methods] Write the java statement for: Sum of a raised to b and cuberoot of c 49. [Understanding] [User Defined Methods] Name the following: (a) Method with the same name as of the class and is invoked every time an object is created. (b) Keyword to access the classes of a package. [Understanding] ICSE Competency-Focused Practice Questions 14 ICSE Class X Computer Applications S.No 50. Questions [Library Classes] Name the following: (a) A Character method that checks whether a character is an alphabet or a number. (b) A Math method that does not have an argument. [Understanding] 51. [String Handling] Cyber police wanted to investigate a case; they wanted to check a list of phone numbers that had 945 anywhere in the phone number. Example: 7394567938, 7685483945.., a method was created to convert the phone number in long data type to a string and check for the existence of the number 945. Fill in the blanks (a) and (b) in the given method with appropriate Java statements: void check(long pno) { String s = _______(a)_________; if(______(b)_______) System. out.println(pno); } 52. [Analysis] [String Handling] A manager wants to check the number of employees with names ending with KUMAR, and fill in the blanks in the given program segment with appropriate Java statements: void count(String s[]) { int i, l=_________, c=0; for(i=0;i<l;i++) { if(________________) c++; } System.out.println(c); } 53. [Application] [String Handling] The output of a program which extracts a part of the string COMPASSION is as follows: (a) PASS (b) PASSION Write appropriate Java statements to get the above outputs. ICSE Competency-Focused Practice Questions [Application] 15 ICSE Class X Computer Applications S.No 54. Questions [Iterative Constructs in Java] Give the output of the following program segment: for(k=a;k<=a*b;k+=a) { if (k%b==0) break; } System. out. println(k); Give the output when a=6, b= 4. 55. [Application] [Library Classes] Kamal wants to display only the alphabets stored in a character array. While compiling the code, an error was displayed. Check for the statement with the error and write the correct statement. char arr[]={ 4 , & , a , w , d }; int i; for(i=0;i<arr.length;i++) { if(Character. isLetter(arr)) System.out. println(arr); } 56. [Application] [Values and Datatypes] Name the type of type casting in the given statements: (a) double m = b ; (b) char ch = (char) 68; 57. [Understanding] [Mathematical Library Methods; String Handling] Write Java statements for the following: (a) To assign the cube root of -343 to a variable with the appropriate datatype. (b) To assign the position of the last occurrence of @ in the String s with the appropriate datatype. [Understanding] 58. [Operators] Mention the output of this code snippet: int lives = 5; System.out.println(lives--); System.out.println(lives); ICSE Competency-Focused Practice Questions [Analysis] 16 ICSE Class X Computer Applications S.No 59. Questions [Iterative Constructs in Java] Convert the following for loop segment to an exit-controlled loop. for(k=10;k>= -1;k- -) System. out. println(k*2); System. out. println(k*4); 60. [Analysis] [Arrays] Give the output of the following program segment: int x[]={2,45,7,67,12,3}; int i, t=0; for(i=0, t=5;i<3;i++,t- -) { System. out. println(x[i]+x[t]; } 61. [Analysis] [Arrays] Write Java statements for the following: (a) Initialise the array with the three favourite subjects. (b) Declare an array to store the marks in 3 subjects of 40 students. [Understanding] 62. [Mathematical Library Methods] A Student executes the given program segment and it results in 1.0, irrespective of the value of n. State the type of the error, write the correct statement: void solve(int n) { double power=Math. pow(n, ); System. out. println(power); } 63. [Understanding] [Encapsulation] Consider the following program segment and answer the questions given: for(int k=1;k<=5;k++) System. out. println(k); System. out. println(k); (a) Will the program segment get executed successfully? (b) If not, state the type of error? (c) How do you correct the program if it has any error? ICSE Competency-Focused Practice Questions [Analysis] 17 ICSE Class X Computer Applications S.No 64. Questions [Arrays] Consider the array: int a[]={12,35,40,22,56,9,70}; (a) In the above given array, using linear search, how many iterations are required to check for the existence of the value 56? (b) If the array is arranged in descending order, how many iterations are required to check for the existence of 56 using linear search? [Analysis] 65. [Evaluation of Expressions] Evaluate the expression: 3*6%5*4/2*7%5 66. [Evaluate] [Arrays] Consider the following program which calculates the Norm of a matrix. Norm is square root of sum of squares of all elements. Fill in the blanks (a) and (b) with appropriate java statements: double norm() { intx[][]={{1,5,6},{4,2,9},{6,1,3}}; int r, c, sum=0; for(r=0;r<3;r++) { for( c=0;c<3;c++) sum=sum+_____(a)_____; } ____(b)________; } 67. [Analysis] [Nested for Loops] Give the output of the following program segment: for(r=1;r<=3;r++) { for(c=1;c<r;c++) { System.out. println(r); } } ICSE Competency-Focused Practice Questions [Analysis] 18 ICSE Class X Computer Applications S.No 68. Questions [String Handling] Give the output of the following program segment: void encode() { String s= DICe ; char ch; for(i=0;i<4;i++) { ch=s. charAt(i); if( AEIOUaeiou . indexOf(ch)>=0) System.out. println( @ ); else System.out. println(ch); } 69. [Analysis] [Arrays] Name the following: (a) What is the main condition to perform binary search on an array? (b) A sort method in which consecutive elements are NOT compared. [Understanding] 70. [Input in Java] Answer the following: (a) Scanner class method to accept a character. (b) Jump statement which stops the execution of a construct. 71. [Understanding] [Iterative Constructs in Java] How many times the given loop is executed? Give the output of the same. for(k=10;k<=20;k+=4) { System.out. println(k); if(k%3==0) continue; } ICSE Competency-Focused Practice Questions [Analysis] 19 ICSE Class X Computer Applications Long Answer Questions (15 marks) S.No 72. Questions [User Defined Methods] The BHDB company offer EMI (Equated Monthly Instalments) based loans for the purchase of electronic devices based on the purchase amount the rate of interest is offered as follows: Purchase amount less than Rs.20000, rate of interest is 12% otherwise the rate of interest is 15%. Amount with interest for the specified number of years is calculated using the formula Amount = p(1+r/100)^n Where p is the purchase amount, r is the rate of interest, n is the number of years. After the amount is calculated it is converted into EMI by dividing the amount by the number of months of the tenure, which has to be a whole number rounded off to the nearest integer. Print the details as follows: Purchase amount: Rate of interest: Amount with interest: EMI: Define a class to accept the purchase amount and the number of years of the tenure, calculate and print the details as per the above specifications. [Application] 73. [Iterative Constructs in Java] Define a class to accept a four-digit number and check if it is a USHWA number or not. The number is said to be USHWA Accept a four digit number . If: Sum of all digits= 2 ( sum of first and last) Example: n =1234 Sum of first and last = 1+4=5 Sum of all digits =1+2+3+4=10 Example 2 If the input value is 354, then a error message should be given as the number has only 3 digits. [Create] ICSE Competency-Focused Practice Questions 20 ICSE Class X Computer Applications S.No 74. Questions [Iterative Constructs in Java; Nested for Loops] (a) Define a class to print the Floyds triangle of given rows using nested loops only. Example: A Floyd triangle of 6 rows is 1 23 456 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 (b) Define a class to print the sum of the following series: 1+(1+2)+(1+2+3)+..........(1+2+3 20) 75. [Analysis] [String Handling] A student appearing for the ICSE/ISC examination will be given an index number, which is of the following format: Number of 7 digits/number of 3 digits. The first digit represents ICSE(1) or ISC(2), the next two digits represent the year, the next four digits represent the centre number, the last 3 digits represent the index number. Example: 1244311/204 Class: 10 Year: 24 Centre number: 4311 Index number: 204 Example : 2259856/107 Class: 12 Year: 25 Centre number: 9856 Index number:107 Define a class to accept the student index number as a String and print his/her details as above. [Analysis] ICSE Competency-Focused Practice Questions 21 ICSE Class X Computer Applications S.No 76. Questions [Arrays] Define a class to accept values into a 3x3 array and check if it is a Losho grid or not. A grid is a Losho grid if the sum of each row and column equals 15. Print appropriate messages. Example: 4 9 2 357 816 77. [Application] [User Defined Methods; Arrays; String Handling] Define a class to overload the method that performs as follows : void perform(int x[]) - to display the largest element of the array. Example: {4, 5, 16, 6, 12, 9} Largest: 16 void perform (String s, char ch) If ch is F print the first 5 characters, if ch is L print the last 5characters Example: s= CARPENTER ch = F Output: CARPE ch = L Output: ENTER void perform(int n) : to print the Product of the first and last digits of the number Example: if n = 45326 Output: 4x6=24 78. [Application] [User Defined Methods] Rahul was asked to create a class with methods to calculate the area of a triangle ( b h ), the area of a square ( s x s), the area of a trapezium ( h(a+b)), the area of a rectangle (l x b). He created a class by giving the same name to all the methods as area. Name the element of Java used in the program. Define a class with the four methods with the same name. [Application] ICSE Competency-Focused Practice Questions 22 ICSE Class X Computer Applications S.No 79. Questions [Arrays] A teacher prepares the statistics of 100 students in ICSE 2024 on the subject Computer Applications as follows: Range No. Of students Above 90 80 - 90 60 - 80 Below 60 Define a class to accept the marks of 100 students in an array and print the statistics as mentioned above. [Application] 80. [String handling] Sam designs a program to check the strength of a password. A strong password should satisfy the following conditions: length of the password should be atleast 12 characters should atleast have 4 upper case letters, 4 lower case letters, 2 digits, 2 special characters Define a class accept the password and check whether the password is strong or not. [Application] ICSE Competency-Focused Practice Questions 23 ICSE Class X Computer Applications Answer Key S.No. Expected Answers 1. (c) Syntax error 2. (d) (i) and (iii) 3. (b) formal 4. (c) public int perform(int a, int b) 5. (d) int m = display(45, A ); 6. (b) RESPECT . toLowerCase( ); 7. (a) (i) and (iv) 8. (a) unboxing 9. (d) length 10. (c) Double. parseDouble(String) 11. (c) run time error 12. (b) char gender[]=new char[80]; 13. (b) (ii), (iii), (iv), (i) 14. (a) (i) and (ii) 15. (c) 99 16. (b) Modularity 17. (c) Ob. nextLong() 18. (a) String.valueOf(n).length() 19. (c) S. replace( E , # ) 20. (b) b comes before a in the dictionary 21. (c) (ii) and (iv) 22. (b) Assertion is true, Reason is true. 23. (c) Methods should have the same number and the same type of arguments. 24. (c) int z = (int) x ; ICSE Competency-Focused Practice Questions 24 ICSE Class X Computer Applications S.No. Expected Answers 25. (c) System. out. println( Raj said \"Good morning\" ); 26. (b) only (i) 27. (a) Entry controlled loop 28. (c) Sorting the list in ascending order. 29. (d) Linear Search 30. (c) Polymorphism 31. (b) String, int, char, double 32. (b) 128 bytes 33. (c) (a+b)*7 34. (c) 120 35. (d) public 36. (a) Math. round() 37. (c) for(i=1i>=1;i++) 38. (a) Assertion is true, Reason is false. 39. (d) Assertion is false, Reason is true. 40. (a) int amount = (int) valueINR 41. (c) 180.0 42. (b) 2 43. (b) System.out.println(a>b? Honest : Sincere ); 44. (a) false,true 45. (a) -17 46. (b) (iii), (i), (ii) 47. (a) {1,2,5,3} 48. Math.pow(a, b)+Math.cbrt(c) 49. (a) Constructor (b) Import ICSE Competency-Focused Practice Questions 25 ICSE Class X Computer Applications S.No. 50. Expected Answers (a) Character.isLetterOrDigit(char) (b) Math. random() 51. (a) s=String. toValue(pno) (b) s. indexOf("945")>=0) 52. s.length s[i]. endswith( KUMAR ) 53. (a) COMPASSION . substring(3,7) (b) COMPASSION . substring(3) 54. a b k 6 4 6 (6%4 is not zero) 6 4 12 (12%4 is zero) Output : 12 55. Statements with error: if(Character. isLetter(arr)) System.out. println(arr) Corrected statements: if(Character. isLetter(arr[i])) System.out. println(arr[i]) 56. (a) Implicit type casting (b) Explicit type casting 57. (a) double c = Math.cbrt(-343); (b) int p = s.lastIndexOf( @ ); 58. 5 4 59. k=10; do { System. out. println(k*2); k- -; }while(k>=-1); System. out. println(k*4); ICSE Competency-Focused Practice Questions 26 ICSE Class X Computer Applications S.No. 60. 61. Expected Answers i t x[i] x[t] output 0 5 2 3 5 1 4 45 12 57 2 3 7 67 74 (a) String subject[]={ Computer applications , Physics , Mathematics }; (b) int m[][]=new int[40][3]; / int m[][]=new int[3][40]; 62. Logical error Correct statement: power=Math.pow(n, 2.0/3); 63. No Syntax error k has to be declared outside the loop int k; for(k=1;k<=5;k++) 64. (a) 5 (b) 2 65. 18%5*4/2*7%5 3*4/2*7%5 12/2*7%5 6*7%5 42%5 2 66. (a) x[r][c]*x[r][c] (b) return Math.sqrt(sum) 67. r c 1 1 2 1 output 2 2 3 1 3 2 3 3 ICSE Competency-Focused Practice Questions 27 ICSE Class X Computer Applications S.No. 68. Expected Answers D @ C @ 69. (a) Array should be sorted. (b) Selection sort. 70. (a) <Scanner object>. next(). charAt(0) (b) break 71. k output count 10 10 1 14 14 2 18 3 22 Loop is executed 3 times ICSE Competency-Focused Practice Questions 28 Computer Applications 72. ICSE Class X Import java.util.*; class emi { double pa, r, amount; int n; Scanner ob=new Scanner(System.in); void accept() { System.out.println( enter purchase amount ); pa=ob.nextDouble(); System.out.println( enter no. Of years ); n=ob.nextDouble(); } void calculate() { if(pa<=20000) r=12; else r=15; amount=p*Math.pow(1+r/100,n); emi=amount/(n*12); } void print() { System.out.println( purchase amount= +pa); System. out.println( rate of interest= +r); System. out.println( amount= +amount); System. out.println( emi= +Math.round(emi); } static void main() { emi e=new emi(); e.accept(); e.calculate(); e.print(); } ICSE Competency-Focused Practice Questions 29 ICSE Class X Computer Applications S.No. 73. Expected Answers Class ushwa { int n; ushwa(int x) { n=x; } void ushwa() { if(String.valueOf(n).length()!=4) { System.out. println( Invalid ); System.exit(0); } int f, d,s=0; f=n%10; while(n>0) { d=n%10; s=s+d; n=n/10; } if(s==2*(f+d)) System. out. println( Ushwa number ); else System. out.println( not an ushwa number ); } } ICSE Competency-Focused Practice Questions 30 ICSE Class X Computer Applications S.No. 74. Expected Answers a) class floyd { void print(int n) { int r, c, k=1; for(r=1;r<=n;r++) { for(c=1;c<=r;c++) { System. out. print(k); k++; } System. out. println(); } } b) class sumseries { void calculate() { int i, s=0,sum=0; for(i=1;i<=20;i++) { s=s+i; sum=sum+s; } System. out. println( Sum= +sum); } } ICSE Competency-Focused Practice Questions 31 ICSE Class X Computer Applications S.No. 75. Expected Answers class index { String s; index(String x) { s=x; } void print() { int p=s.indexOf( / ); char c = s.charAt(0); int y=Integer. parseInt(s.substring(1,3)); String centre=s.substring(3, p); String n = s.substring(p+1); if(c== 1 ) System.out.println( Class : +10); if(c== 2 ) System.out. println( Class : +12); System.out.println( Year : +y); System.out.println( Centre number : +centre); System.out. println( Index number : +n); } } ICSE Competency-Focused Practice Questions 32 ICSE Class X Computer Applications S.No. 76. Expected Answers import java. util.*; class losho_grid { int x[][]=new int[3][3]; Scanner ob=new Scanner(System. in); void accept() { int r, c; for(r=0;r<3;r++) { for(c=0;c<3;c++) { System. out. println( Enter the value ); x[r][c]=ob. nextInt(); } } } void check() { int r, c, rtot=0,ctot=0; (1) for(r=0;r<3;r++) (1) { for(c=0;c<3;c++) (1) { rtot+=x[r][c]; (1) ctot+=x[r][c]; (1) } if(rtot!=15||ctot!=15) (2) { System. out. println( Not a loshogrid ); (1) System. exit(0); } rtot=0;ctot=0; (2) } System. out. println( losho grid); (1) } } *declaration and accepting the array 2 marks List of variables 2 marks ICSE Competency-Focused Practice Questions 33 ICSE Class X Computer Applications S.No. 77. Expected Answers class overload { void perform(int x[]) (1) { int i, l=x. length, large=x[0]; (1) for (i=0;i<l;i++) (1) { if (x[i]> large) (1) x[i]=large; (1) } System. out. println(large); (1) } void perform(String s, char ch) (1) { int l=s.length(); (1) if (ch== F ) (1) System. out.println(s. substring(0,5); (1) if (ch== L ) System. out. println(s.substring(l-5); (1) } void perform(int n) { int d, p=1; (1) while(n>0) (1) { d=n%10; p= p*d; n=n/10; (1) } System.out.println((p)); (1) } } ICSE Competency-Focused Practice Questions 34 ICSE Class X Computer Applications S.No. 78. Expected Answers class polygon { void area(double b, double h) { System.out.println( Area of triangle= +1.0/2*b*h); } void area(double s) { System.out. println( Area of square= +s*s); } void area(double h, double a, double b) { System.out. println( Area of trapezium= +1.0/2*h*(a+b)); } void area(int l, int b) { System. out.println( Area of rectangle= +l*b); } } Feature - polymorphism(overloading) ICSE Competency-Focused Practice Questions 35 Computer Applications 79. ICSE Class X import java.util.* class statistics { int x[]=new int[100]; Scanner ob = new Scanner (System.in); void accept() { int i; for(i=0;i<100;i++) { System.out.println( Enter marks ); x[i]=ob.nextInt(); } void statistics() { int i, a=0,b=0,c=0,d=0; for(i=0;i<100;i++) { if(x[i]>90) a++; else if(x[i]>80&&x[i]<=90) b++; else if(x[i]>60&&x[i]<=80) c++; else d++; } System.out.println( Range\tNumber of students ); System.out. println( Above 90 + \t +a); System.out. println( 80 - 90 + \t +b); System. out.println( 60 - 80 + \t +c); System.out. println( <=60 + \t +d); } } ICSE Competency-Focused Practice Questions 36 ICSE Class X Computer Applications S.No. 80. Expected Answers class strength { String s; strength(String z) { s=z; } boolean strength() { int i, l=s. length(); char ch, uc=0,lc=0,d=0,sp=0; if (l<12) return false; for(i=0;i<l;i++) { ch=s. charAt(i); if(Character.isUpperCase(ch)) uc++; if(Character.isLowerCase(ch)) lc++; if(Character.isDigit(ch)) d++; if(!Character.isLetterOrDigit(ch)) sp++; } if (uc<4) return false; if(lc<4) return false; if(d<2) return false; if(sp<2) return false; return true; } } ICSE Competency-Focused Practice Questions 37 Computer Applications ICSE Competency-Focused Practice Questions ICSE Class X 38

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

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

 

soumilenglang31 chat