Trending ▼   ResFinder  

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

3 pages, 4 questions, 0 questions with responses, 0 total responses,    0    0
Amrita Pandey
Unison World School (UWS), Dehradun
+Fave Message
 Home > amritapandey1 >   F Also featured on: School Page

Formatting page ...

UNISON WORLD SCHOOL, DEHRADUN 1st Preliminary Examination (2019-2020) Computer Applications Theory: X Time:2 hrs Max Marks: 100 Instructions: Reading Time is 15 min. 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 (40 Marks) (Attempt all questions) Q.1 (a) (b) (c) (d) (e) Q.2 (a) [2] [2] [2] [2] [2] Consider the following data type and answer the following: String word= UTTARAKHAND (i) A function to convert the string into small letters. (ii) A function to find the number of characters present in the string. (iii) A function to take out the last character. (iv) Write a statement to get a new string as AKHANDBHARAT . What is the role of try and catch? Give an example. Write one difference between if else and switch case.. State the differences between static and non static data member in a class. [4] What will be the output of the following program segments ? i) String s = "application"; int p=s.indexOf( a ); System.out.println(p); System.out.println(p+s); ii) String st = NEWSTAR System.out.println(st.indexOf(st.charAt(5)) iii) int a=10; if(a>10 && a<20) a++; else a--; System.out.println(a); [2] (b) What will be the output of the following code ? int a=10; int b=15; while(++a< --b) System.out.println(b); System.out.println(a); [2] (c) What is the result produced by 4 10 * 3 + 200/12 ? Show the steps. [2] (b) (c) (d) Q.3 State the differences between: binary operator and ternary operator for loop and do while loop System.in and System.out equals( ) and compareTo( ) Actual parameter and Formal parameter (a) [2] [2] [2] [2] [2] Q.4 (a) (b) State the differences between linear search and binary search. If int x[ ] = {3, 4, 5, 6, 7, 9, 11}, what are the values of a and b ? int a = Math.pow(x[3], x[1]); int b = Math.sqrt(x[4] + x[5]); (c) What will be the output of the following: ii) int a[4] = { 2, 4, 6, 8}; int s=0; for(int j=0;j<4;j++) { s= a[j] + a[3-j]; System.out.println(s); } (c ) What will the following function return when executed ? i) Math.max(-17, -19) ii) Math.ceil(7.8, 9.4) [2] [2] [4] [2] SECTION B (60 Marks) (Attempt any four questions from this section) Q.5 Define a class IncomeTax having the following description: Data members/instance variables int pan - to store permanent account number String name - to store name of person int income - to store annual income of the person double tax - to store tax to be paid by the person Member functions: IncomeTax () -- constructor to initialize pan as 0, name as null and income as 0. input() - to accept pan, name and income. calculate() - to calculate tax for a person as per following condition Income Tax Rate Upto Rs. 180000 Nil Rs. 180000 to Rs. 500000 10% Rs. 500001 to Rs. 800000 20% Rs. 800000 and above 30% [15] void display(): To display the details. Write the main method to create an object of a class and call all the above member methods. Q.6 Q.7 Write a program with the following specifications: class name: Stringop Data members: String st, rev; int c; Member functions: void getstr() : to accept a sentence as a string void manip() : to reverse the string and display each word void manip() : to obtain string after replacing all vowels by # and display Write main method and invoke above methods by creating objects Write a menu driven program to display the following: i) to display 5 simultaneous prime numbers from a given number entered by the user ii) to find sum of the series S = 1 a/2 +3 a/4 + 5 a/6 + to n [15] [15] Q.8 Write a program in Java to store 5 words in a single dimensional array and frame a new word by taking out the first character of each word. Arrange the letters of the new word in alphabetical order and display the resultant word. Sample Input : English, Geography, Mathematics, Chemistry, Biology New word : EGMCB Sample output : BCEGM [15] Q.9 i) Write a program to accept a number and display the new number after removing all zeros Sample Input: 5400207 Sample output: 5427 ii) Write a program to input all two-digit numbers between 10 and 99(both inclusive). The program displays only those numbers whose tens digit is twice the units digit. Sample Output : 12, 24, 36, . [15] Q.10 Write a program to create a Double Dimensional Array(DDA) as : char ch[ ] [ ] =new ch[3][3]; The program stores nine different letters in the double dimensional array. Display the letters, which are vowels. Sample Input: p e r w d a u m k Sample output: e, a, u [15]

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

amritapandey1 chat