Trending ▼   ResFinder  

ICSE Class X Prelims 2023 : Computer Applications (Jamnabai Narsee School (JNS), Mumbai) Prelim / Pre-Board 2

8 pages, 41 questions, 24 questions with responses, 24 total responses,    0    0
ICSE
Indian Certificate of Secondary Education (ICSE), New Delhi
+Fave Message
 Home > icse >   F Also featured on: School Page

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

SECOND PRELIMINARY EXAMINATION JANUARY 2023 COMPUTER APPLICATIONS Std. : 10 Time: 2 hrs. Marks: 100 Date:13.01. 2023 ___________________________________________________________________________ Answer to this Paper must be written on the paper provided separately. You will not be allowed to write during the first 15 minutes. This time is to be spent in reading the question paper. The time given at the head of this Paper is the time allowed for writing the answers. 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 [ ]. This paper consists of 8 printed pages. SECTION A (Attempt all questions from this Section.) Question-1 Choose the correct answer and write the correct option. i. When an expression consists of int, double, long, float, then the entire expression will get promoted to a data type that is: a. float b. double c. int d. long ii. Out of these methods of the String class, which one can be used for testing two strings for equality? a. b. c. d. isequals() isequal() equals() equal() 1 [20] iii. What value is returned by the compareTo() function in case the invoking string happens to be greater than the compared string? a. b. c. d. iv. a value that is greater than zero a value that is less than zero zero none of the above What does the expression float a = 35 / 0 return? a. 0 b. not a Number c. infinity d. run time exception v. Evaluate the following Java expression, if x=3, y=5, and z=10: ++z + y - y + z + x++ a. 24 b. 23 c. 20 d. 25 vi. Which of the following for loop declaration is not valid? a. for ( int i = 99; i >= 0; i / 9 ) b. for ( int i = 7; i <= 77; i += 7 ) c. for ( int i = 20; i >= 2; - -i ) d. for ( int i = 2; i <= 20; i = 2* i ) vii. Which package contains the Scanner class? a. java.util package b. java.lang package c. java.awt package d. java.io package 2 viii. Which keyword is used for accessing the features of a package? a. b. c. d. package import extends export ix. Which method of class String is used to obtain length of String object? a. get() b. Sizeof() c. lengthOf() d. length() x. Java method signature is the combination of ___________. a. return type b. method name c. argument list d. all of the above xi. An object is created during __________ in Java. a. compile time b. run time c. assembly time d. debugging time xii. Creating an object from a class is also called ___________. a. initializing b. instantiating c. interfacing d. implementing xiii. Which symbol is used to declare an array in Java? a. braces { } b. parentheses () c. square Brackets [ ] d. angled Brackets < > xiv. What is the output of the below java code? int bat[] = { }; System.out.print(bat.length); a. 0 b. -1 c. 1 d. Compiler error 3 xv. What is the output of below java code ? Strings[ ] colours = { RED , YELLOW , WHITE }; System.out.print(colours[2] ); a. RED b. YELLOW c. WHITE d. Compilation error xvi. Java ternary operator is also called _________________. a. relational Operator b. conditional Operator c. logical Operator d. bitwise Operator xvii. Evaluate the following Java expression, if x=3, y=5, and z=10: ++z + y - y + z + x++ a. 24 b. 23 c. 20 d. 25 xviii. Which of these cannot be used for a variable name in Java? a. Identifier & keyword b. Identifier c. Keyword d. Operators xix. What is the extension of compiled java program file? a. .txt b. .jas c. .class d. .java xx. Which of these is control statement in Java? a. break b. continue c. for( ) d. if( ) Question-2 4 i. What will be the output of the following program code? [2] int m =2, n=15; for(int i=1;i<=10;i++) m++; --n; System.out.println("m= " +m); System.out.println("n= " +n); ii. What is the data type returned by the following library functions? a. compareTo() b. equals() [2] iii. How many times the following loop will execute? What will be the output? int k = 1, i =2; while(++i<8) k*=i; System.out.println("k = " + k); [2] iv. Write a statement each to perform the following task on a string: a. Extract the second last character of a word in the variable text. b. Check if the second character of the string str is in uppercase or not. [2] v. State two features of the constructors in java. [2] vi. Differentiate between static and non-static data members. [2] vii. What is the difference between charAt() and indexOf() method? [2] viii. Give the output of the following string functions a. System.out.println("MISSISIPPI".indexOf('I') + "MISSISIPPI".lastIndexOf('P')); b. System.out.println("CABLE".compareTo("CADET")); [2] What is the output of the following program code? char ch = F ; [2] ix. 5 int m = ch; m = m + 5; System.out.println( m + + ch); x. What is the output of the following program code? [2] int a[] ={2,4,6,8,10}; a[0]=23; a[3]=a[1]; int c= a[0]+a[1]; System.out.println("Sum = "+c); SECTION B (Answer any four questions from this Section.) The answer in this section should consist of programs in either BlueJ environment or any program environment with java as the base. Each program should be written using variable description / mnemonic codes so that the logic of the program is clearly depicted. Flowcharts and algorithms are not required. Question-3 Define a class with the following specifications. Class name : DenaBank Data Members/Instance Variables Name : to store name of the customer Address : to store customer s address Phone : to store customer s mobile number Amount : to store the amount Interest : to store interest Functions/Member methods bank(String nam, String add, int pno, int amt): parameterised constructor to assign nam to Name, add to Address, pno to Phone, amt to Amount compute() : compute the interest as 5.9% of the Amount display() : displays the details of the customer in the format given Name : _____________________ Address : ______________________ Phone : _____________________ Amount : __________________ Interest : _________________ Write a main() method to create object and call the above methods accordingly. 6 [15] Question-4 Write a program to accept 5 elements and store it in arr1 and accept 8 elements and store it in arr2 respectively. Create a third array arr3 which contains all the elements of arr1 and arr2. Display the resultant array arr3. Sample Input : 23 32 12 67 Enter 5 elements in array 1 34 56 78 Enter the 8 elements in array 2 76 79 24 87 96 Sample Output : Resultant array 3 23 12 34 56 78 32 67 Question-5 [15] 76 79 100 24 87 96 100 Write a Java program to check whether a number is a Duck Number or not. [ A Duck number is a number which has zeroes present in it, but there should be no zero present in the beginning of the number.] [15] Example 3210, 7056, 8430709 are all duck numbers whereas 08237, 04309 are not. Question-6 Sample Input. : Sample Output : Enter the number: 4306 4306 is a duck number Sample Input. : Sample Output : Enter the number: 05564 05564 is not a duck number Write a program in Java to accept a word/a String and display the new string after removing all the vowels present in it. Sample Input: COMPUTER APPLICATIONS Sample Output: CMPTR PPLCTNS 7 [15] Question-7 Question-8 Write a program to overload a method HappyString( ) as follows : (i) void HappyString( String s1, char ch1, char ch2) with one string argument and two-character arguments, it replaces the character argument ch1 with the character argument ch2 of the string s1 and prints the new string. Example Sample Input : Input value string s1 as : CAMPUTER Input ch1 as : A Input ch2 as : O Sample Output : COMPUTER (ii) void HappyString(String s2) with one string argument, method prints the position of the first space and the position of last space of the given string s2 Sample Input : Enter the string as: Artificial Intelligence is everywhere Sample Output : First space : 10 Last Space : 27 (iii) void HappyString( String s3, String s4) with two string arguments, the method combines the two strings with a space between them and prints the resultant string. Sample Input : Enter the string s3 as: FIFA Enter the string s4 as: WORLD CUP 2023 Sample Output : FIFA WORLD CUP 2023 Write a program to input 10 names in an array and arrange the names in descending order of alphabets using Bubble Sorting technique. Sample Input : Enter any 10 names in an array Ayaan, Daksh, Zen, Parth, Sam, Chitra, Bonney, Vedika, Diya, Raghav Sample Output : Array after sorting is : Zen, Vedika, Parth, Raghav, Sam, Diya, Daksh, Chitra, Bonney, Ayaan _____________________________________________________________________ 8 [15] [15]

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Harsh Chodankar

(24)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : icse free download, icse papers, pdf download 2020 2021 2022 2023, 2024 icse sample papers, icse books, portal for icse india, icse question bank, indian certificate of secondary education, icse question papers with answers, icse model test papers, solved past board question papers of icse last year, previous years solved question papers, free online icse solved question paper, icse syllabus, india icse board sample questions papers, last 10 years icse papers, icse question papers 2022 - 2023, icse guess sample questions papers, icse important questions, class 10 specimen / guess / mock papers, icse pre board question papers, icse 2022 - 2023 pre-board examination  

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

 

icse chat