Trending ▼   ResFinder  

ICSE Class X Prelims 2023 : Computer Applications (Sanskriti the Gurukul, Kamrup)

6 pages, 38 questions, 0 questions with responses, 0 total responses,    0    0
Sumana Nag
Sanskriti the Gurukul, Kamrup
+Fave Message
 Home > sumanan38 >   F Also featured on: School Page

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

Formatting page ...

Page 1/ PB II/2023-24/ Comp App/SC 10 Pre-Board II Session- 2023-24 Subject-Computer Applications (Theory) Study Center: X Time allotted: 2 hours This question paper consists of 6 pages Full Marks: 100 ---------------------------------------------------------------------------------------------------------------------Answers 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. 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 [20] i) If m=-16, then what is the output of Math.sqrt(m)? a. -4.0 b. NaN c. Syntax error d. Runtime error ii) The process of binding data and function together as one unit is called: a. Dynamic Binding b. Abstraction c. Encapsulation d. Polymorphism iii) If the value of the switch variable/ expression doesn t match with any of the case constants, then which of the following cases gets executed. a. First case b. All the cases c. Default case d. Control jumps out of the switch statement iv)Related classes are grouped together into a. Library b. Object c. Super class d. Package Page 2/ PB II/2023-24/ Comp App/SC 10 v) int a = 10; double b = 25.5; float c = (float)(a + b); In the above code segment which type conversion is shown? a. Static Type conversion b. Implicit Type Conversion c. Explicit Type Conversion d. Default Type Conversion vi) What is the total size in bytes allocated for the array p[5] of char datatype? a. 5 bytes b. 10 bytes c. 20 bytes d. 40 bytes vii) The output of the method TRIGGER .substring(2,5) is: a. RIGG b. IGGE c. IGG d. RIG viii) The default constructor is used for: a. Calling default methods b. Dereferencing default objects c. Initializing default value to objects d. All of the above ix) What will be the output of: double n2 = Double.parseDouble("2"); double n3 = Double.parseDouble("OCA"); System.out.println(n2 + " " + n3); a. 2 OCA b. 2.0 OCA c. Number Format Exception d. Logical Error x) Which value is in matrix[2][2]? int [ ] [ ] matrix = { {1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16} }; a. 6 b. 7 c. 10 d. 11 xi) What is the return type of equals( )? a. char b. String c. boolean d. float Page 3/ PB II/2023-24/ Comp App/SC 10 xii) What is the output of the following code fragment? String [ ] name = { "Joe", "Sue", "Tom", "Jill", "Patty"}; for (int i = 0; i < name.length; i = i + 2) System.out.print(name[i] + " "); a. Joe Sue Tom Jill Patty b. Patty Jill Tom Sue Joe c. Joe Tom Patty d. Sue Jill xiii) Assertion(A) : A local variable can t use any access specifier. Reason (R ) : Local variables are declared in method, constructor or block a. Both A and R are true and R is correct explanation of A b. Both A and R are true and R is not a correct explanation of A c. A is false and R is true d. A is true and R is false xiv) What will be the output of the following program snippet str1= AVATAR ; str2= AVAILS ; System.out.println(str1.compareTo(str2)); a. 0 b. 11 c. -11 d. 3 xv)What will be the output of the following switch case construct when x= g ? switch(x) { case M : System.out.print( Microsoft Teams ); break; case G : System.out.print( Google Meet ); default: System.out.print( Any software ); break; case W :System.out.print( Web Ex ); break; } a. Microsoft Teams b. Google Meet c. Any software d. Web Ex xvi)Choose the correct answer and write the correct option. String st= Guwahati .replace( a , o ); In the above statement, the effect on string Guwahati is :a) The first occurrence of a is replaced by o . b) All characters of a are replaced by o . c) All characters of o are replaced by a . d) Displays error message. Page 4/ PB II/2023-24/ Comp App/SC 10 xvii) Multiline comment is created using ___. a) // b) /* */ c) <!-- -- > d) All of these xviii)Which method in java is used to generate random numbers in Java? a) random.nextInt() b) random() c) rand() d) rint() xix) Which statement is correct for a private member in Java? a) Access outside the class is allowed b) Any class can access c) Declared using private keyword d) All of these xx) Wrapper class in java is used to___. a) Encapsulate primitive data types b) Declare new classes called wrapper c) Create a new instance of the class d) Manipulate strings Question 2 a. What would be the output of the following code snippet if variable p=20? public class Result { public static void main(String args[]) { int p=20; if(p<=0) { if(p==0) { System.out.println("5 "); } else { System.out.println("10 "); } } System.out.println("15 "); } } [2] Page 5/ PB II/2023-24/ Comp App/SC 10 b. int x=20 and y=10, z=5; What is the value of z in : z/=++x + (y -- ) - y Show the steps. c. What will be the output of the following code? float x=10.64; System.out.println(Math.ceil(x); System.out.println(Math.floor(x); [2] [2] d. What is the difference between a static member function and a member function which is not static? [2] e. Rewrite the following condition without using logical operators: [2] if ( a>b || a>c ) System.out.println(a); f. Write the prototype of a function search which takes two arguments a string and a character and returns an integer value. [2] g. Write a java statement for each to perform the following task: [2] (i) Find and display the position of the last space in a string str. (ii) Extract the second character of the string str. h. Write one difference between Linear Search and Binary Search. [2] i. Rewrite the following while loop to the corresponding for loop. [2] int a=5, b=10; while (b>=1) { System.out.println(a*b); b- -; } j. Differentiate between the following statements :- [2] Student ob1 = new Student( ); Student ob1 = new Student( Ravi ,65,98,86 ); SECTION B( 60 marks) (Attempt any four questions from this section) The answers in this section consist of the Programs in either BlueJ environment or any program environment with Java as the base. Each program should be written using variable description / Mnemonic codes such that the logic of the program is clearly depicted. Flowcharts and algorithms are not required. Question 3 [15] The basic salary of employees is undergoing a revision. Define a class called Grade_Rev with the following specifications :Instance variables / Data members : String name : to store name of the employee int bas : to store basic salary int expn : to consider the length of service as an experience double inc : to store the increment double nbas : to store new basic salary (basic + increment) Member methods: Grade_Rev() : constructor to initialize all data members void accept() : to input name , basic, experience void display() : to display all the details of the employee void increment() : to calculate increment with the following specifications : Page 6/ PB II/2023-24/ Comp App/SC 10 Experience Increment Up to 3 years Rs. 1,000 + 10% of basic 3 years or more and up to 5 years Rs. 3, 000 + 12% of basic 5 years or more and up to 10 years Rs. 5, 000 + 15% of basic 10 years or more Rs. 8, 000 + 20% of basic Write the main method to create an object of the class and call all the member methods. Question 4 [15] Write a program to accept a sentence and print only the first letter of each word of the sentence in capital letters separated by a full stop. Example: INPUT SENTENCE : This is my book OUTPUT : T.I.M.B. Question 5 [15] Design a class overloading and a method display()as follows : i) void display(String str, int p) with one String argument and one integer argument. It displays all the uppercase characters if int p is 1(one) otherwise , it displays all the lowercase characters. ii) void display(String str, char chr) with one String argument and one character argument. It displays all the vowels if char chr is v otherwise , it displays all the alphabets. Write the main method to execute the above class. Question 6 [15] Write a program to initialise the following array and search for a number. Display the number with its position if it is found other print a message NOT FOUND a[]={1203, 1205, 1290,1300,1345, 1378, 1401} Question 7 Write a program to input a 3x4 matrix and perform the following operations: 1. Display the original matrix. 2. Print the elements in the even rows and cube of the numbers in the odd rows Question 8 [15] [15] Write a program to input a sentence and do the following: 1. Print the length of the sentence 2. Convert each character of the string to the second next character and print the new string . For example A becomes C, Y becomes A and Z becomes B ************

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

 

sumanan38 chat