Trending ▼   ResFinder  

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

6 pages, 36 questions, 0 questions with responses, 0 total responses,    2    0
Darsh Khakholia
  
+Fave Message
 Home > darsh5 >   F Also featured on: School Page icse

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

Formatting page ...

Page 1/ PB I/2023-24/ Comp App/SC 10 SANSKRITI THE GURUKUL Pre-Board II Session- 2023-24 Subject-Computer Applications (Theory) Time allotted: 2 hours Study Center: X This question paper consists of 6 pages Full Marks: 100 Answers to this Paper must be written on the paper provided separately. You willnot be allowed to write during the first 15 minutes. This time is to be spent in reading 1he question pape:. The t me gien at thehead of this Paper is the time allowed for writing the answers. Tis Paper is divided into two Sections. Altempt all questions fiomSection A and any four questions from Section B. The intended marks for questions or parts of questions ae given in brackets[]. SECTION A Questionl (Atempt all questionsfrom this Section.) i) If m=-l6, then what is the output of Math.sqrt(m)? [20] 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 ii) If the value of the switch variable/ expression doesn't match with any of thecase constants, then which of the following cases gets executed. a. First case b. Al]the cases c. Default case d. Control jurnpsout of the switch statement iv)Related classes are grouped 1ogether into a. Library b. Object c. Super class d. Package Page 2/ PB II/2023-24/ Comp App/SC v) int a = 10; double b=25.5; float c - (tloat)(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 a. RIGG b. IGGE TRIGGER".substring(2,5) is: c. IGG d. RIG vii) 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 typeof equals( )? a. char b. String C. b0olean d. float Page 3/ PB II 2023-24/Comp App SC 10 xii) What is the output of the foilowing code fragment? "Patty"}: String [] name =("Joe", "Sne", "Tom", "il", 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 xii) Assertion(A):Alocal variable can't use any access specifier. Reason (R):Local variables are declared in method, constructor or block a. Both Aand 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. Ais true andR is false xiv)What will be the output of the following program snippet strl= AVATAR"; str2= AVAILS"; System.out.println(strl.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) c) Allcharacters of 'a' are replaced by 'o'. All characters of 'o' are replaced by 'a'. d) Displays error message. Page 4/ PB Multiline conent is crcatcl using a) / Xvii) IL/2023-24/|Comp b)* c) <- --> d) Allof these xVii)Which method in javais used to generate random numbers in Java? a) random.nextlnt) 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 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; iflp<0) iflp--0) {Systemn.out.println("5 "); } else {System.out.println("10 "); } System.out.println("15 "); AppsC Papc 5/ PB II/2023-24/ Comp App/SC 10 b. int x-20 and y-10, z-5: What is the valueof z in : [2] z/=ttx +(y--)-y Show thc steps. c. What will be the output of the following code? float x=10.64; [2] System.out.printh(Math.ccil(x), System.out.printIn(Math.floor(x) d. What is the difference betwcen a staticmember function anda member function which is not static? [2] [2] e. Rewrite the following conditionwithout using logical operators: if (a>b ||a>c) Systen.out.println(a);: f. Write the prototype of afunction search which takes two arguments a string and a [2] [2 character and returns an integer value. g. Write ajava statement for cach to perfornm the following task: () Findand display the position of the last space in a string str. (ii) Extract the second character of the string str. (2] (2] .. Write one diference between Linear Search and Binary Search. i. Rewrite the following while loop to the corresponding for loop. int a=$, b=10; while (b=1) {System.out.println(a*b); b- ; } /. (2] Differentiate between the following statements : Student obl = new Student( ); Student obl = new Student("Ravi",65,98,86 ); SECTION B( 60 marks) (Attempt any four questions from this section) environment or any The answers in this section consist of the Programs in either BlueJ should be written using variable progran environment with Java as the base. Each program description / Mnemonic codes such that the logic of the program is clearly depicted. Flowcharts and algorithms are not required. [13] Question 3 class called Grade Rey with The basic salary of employees is undergoing a revision. Define a : the following specificationsmembers : Instance varialbles / Data String name int bas int expn double inc double nbas Member methods: Grade Rev) void accept) void display) void increment() :to store name of the employee : to store basic salary : toconsider thelength of service as an experience : to store the increment to store new basic salary (basic+ increment) :constructor to initialize all data members : to input name , basic, experience : to display all the details of the employee : to calculate increment with the following specifications : Page 6/ PB II/2023-24/ Comp App/SC Increment Experience Up to 3 years Rs. 1,000 + 10% ofbasic 3 years or more and up to 5 Rs. 3, 000 + 12% of basic years Rs. 5, 000 + 15% of basic 5years or more and up to 10 years Rs. 8, 000 + 20%% of basic 10 years or more Write the main method to create an object of the class and callall the member methods. [15] Question 4 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 :TIM.B. [15] Question 5 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 l(one) otherwise , it displays all the lowercase characters. i) 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 anumber. 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 [15] 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 [13] Question 8 Write a program to inputa sentence and do the following: 1. Print the length of thesentence 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 **** ******** 10

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

 

darsh5 chat