Trending ▼   ResFinder  

ICSE Class X Prelims 2024 : Computer Applications (Ashoka Universal School (AUS), Nashik)

6 pages, 39 questions, 39 questions with responses, 86 total responses,    0    0
Anwesha Ray
  
+Fave Message
 Home > anwesharay >   F Also featured on: School Page

Formatting page ...

Ashoka Group of Schools Academic Session 2023-2024 Grade X Preboard 1 Time: 2hrs Subject: Computer Application Marks: 100mks 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. Time given at the head of this paper is the time allowed for writing the answers. This paper is divided in 2 sections. Attempt all questions of section A and any 4 questions of section B. The intended marks for questions or part of questions are given in square brackets [ ]. In programs give appropriate variable names and comments wherever necessary. Section A (Attempt all questions from this Section) Question 1: Choose the correct answer and write the correct option: i) ii) iii) iv) [20] If the value of basic=1200, what will be the value of tax after the following statement is executed? tax = basic+700>1200*2 ? 200*2 :100*2; a) 400 c) 200 b) 100 d) error The SDA array of data type double with size 3 occupies a) 8 bytes c) 3.0 bytes b) 11 bytes d) 24 bytes What will be the value of a after execution of following expression: int a=6,b=3,c=2; a%=b+c++ +b+c; a) 9 c) 8 b) 10 d) 6 Identify OOPs concept being featured in the following class structure: class student { } class science extends student { } class commerce extends student { } a) Platform Independent b) Polymorphism 2023-24/Grade X/Preboard I/Computer Application c) Inheritance d) Abstraction Page 1 of 6 v) Name the process in the given image where teacher is communicating to a student for a task: a) instantiation b) message passing c) encapsulation d) inheritance vi) Assertion (A): Java is platform independent language Reason (R): JVM is same for all Operating System a) Both A and R are true and R is the correct explanation for A b) Both A and R are true and R is not the correct explanation for A c) A is True but R is False d) A is false but R is True vii) A class compromises of ? a) attributes b) behaviors viii) c) both options a and b d) only option b S=Integer.toString(20)+Long.toString(23), what is the value stored in the variable S? a) 2023 c) 2023 b) 43 d) Error ix) From the following options which operator has the least precedency: a) Increment operator c) Logical operator b) Arithmetic Operator d) Relational Operator x) The operator which is also a keyword in java a) int b) (type) c) dot d) new xi) Rachna wants to enters her name with surname but wants only the first name. Which function she should use from the following: c) nextWord() a) next() d) nextLine() b) nextString() xii ) int a=Math.sqrt(Math.abs(-25)); What type of error it will give a) Syntax Error b) Runtime Error c) Logical Error d) Semantic Error xiii) System.out.println(Math.ceil(6.5)+Math.floor(-1.5)); will result? a) 5.0 c) 7.0 b) 6.0 d) 4.0 2023-24/Grade X/Preboard I/Computer Application Page 2 of 6 xiv) An Argument variable in a function has its scope: a) Limited within the function b) can be accessed anywhere c) Limited within the class d) No limitation at all xv) Java language provides a looping construct in which user may not be aware of number of iterations. Such type of iterations is referred as infixed iterations. Based on the above statement , which among the following loop(s) support the above statements. a) for loop b) while loop xvi) c) while and do while loop d) do-while loop What will be the output of the following code segment: int y=5,x; for (x=10; x<=15;x++); y--; System.out.print((x+y)+ , ); a) 20, c) 15, 14, 13, 12,11,10 b) 15, d) 16, xvii) Identify the operator to join two relational expression whose resultant is true even if one expression is true : a) || b) ! c) && d) ++ xviii) Pick out the wrong declaration of the array from the following a) int []a=new a[size] c) float [] t[]= new float[10][10] b) char c[][]=new char[4][] d) byte d[]=new byte[15] xix) In which way the function check(int age[]) will be invoked? a) call by reference c) actual call b) call by value d) formal call xx) Find the output of the following code: int m=8; switch(m*2) { default: System.out.println(Math.pow(5,2)); case 18: System.out.println(Math.cbrt(m)); break; } a) 25.0 2.0 b) 25.0 c) error, expression m*2 cannot be written in switch. d) error, default should be always come at the end. 2023-24/Grade X/Preboard I/Computer Application Page 3 of 6 Question 2: i) Complete the following code so as to find the product of even numbers from 1 to n. Assume Scanner object as sc. n is the end value to be accepted from the user. [2] int n=blank1; int p=blank2; for(int i=1;i<=n;i=i+2) { if(blank3==0) p=blank4; } System.out.println( Product of even number is: +p); ii) Name the following: a) Wrapper class for char data type. b) To extract the first occurrence of a character from a string. [2] iii) The following code segment should print You can have chocolate if you have done homework(dh) and cleaned your room(cr). However, the code is giving an error. Fix the code so that it compiles and run correctly. (Rewrite the corrected code) [2] boolean dh=True;//st1 boolean cr= True;//st2 if(dh&&cr)//st3 System.out.println( Complete you task );//st4 else System.out.println( You can eat chocolate ); //st5 iv) Convert the following ternary operator statement in if else statement. String s=(grade== A ||grade== B )? Marks range is 80 to 100 : Study hard ; System.out.println(s); [2] v) Write the difference between Entry controlled loop and exit controlled loop. [2] vi) What will be the output when the following code segment is executed? char ch='2'; System.out.println((ch+1)+" "+ ++ch); [2] vii) What will be the output for the below statements if given array is: String s[][]={{"India","Australia"},{"Srilanka","Singapore"},{"Japan"}}; a) System.out.println(s[1][1].substring(0,4)+ " "+s[0][0].substring(s[0].length ); b) System.out.println(s[1].length()<s[s.length-1]); [2] viii) Give the output of following code and mention how many times the loop will execute? int i=1; while( i++<=7) { if(i %2 ==1) continue; System.out.print( ++i+" "); } 2023-24/Grade X/Preboard I/Computer Application [2] Page 4 of 6 ix) Name the data type and the value returned by the following functions. a) Comic .startsWith( CO ); b) COMIC .compareToIgnoreCase( comet ); [2] x) [2] Write a Java expression for the following: | x 2 + 2xy | Section B [Any 4] Each Program should be written using variable description/ mnemonic codes. Question 3: [15] Design a class Tax with the following specifications: data members: name : to store accepted name of the employee. grade : to store accepted grade of the employee. (Grade of the Employee as A or B) sal : to store accepted monthly salary n_pay : to calculate and store net pay( net pay =total annual income-PF+HRA) member methods: Tax(): a default constructor to initialize the data members with default values. input(): to accept name, age and monthly salary from the employee. calculate(): to calculate the net pay of an employee along with their PF and HRA based on following criteria: Grade A Employee Grade B Employee Total annual income Upto Rs. 1,50,000 PF=10 % annual income PF=5 % annual income HRA=7% of annual income HRA=5% of annual income From 1,50,001 to 2,50,000 PF=15 % annual income PF=12 % annual income HRA=20% of annual income HRA=10% of annual income Above Rs. 2,50,000 PF=17 % annual income PF=15 % annual income HRA=25% of annual income HRA=12% of annual income print() : display all the information as follows: Output: Emp Name Grade of Emp Annual Salary PF HRA Net Salary XXX XXXX XX XXX XXXX X Question 4: Design a class to overload a method series as follows: series(int n) to print the following series 2,5,10,17,26 .n terms series(int a, int n): to print the sum of the following series: 2 4 6 [15] 8 = 1 8 + 27 64 + . . series(String s): to print the following pattern if value of s= series S SE SER SERI SERIE SERIES 2023-24/Grade X/Preboard I/Computer Application Page 5 of 6 Question 5: [15] Write a program to check and display whether the entered number is a peterson number or not. A number is called a peterson number whose sum of factorial to it s digits are equal to the original number. Example 1: 145. 1!+4!+5! = 1+24+120 = 145. Hence it is a Peterson Number. Example 2: 415. 4!+1!+5! = 24+1+120 = 145. Here the result is not equal to the original number. Hence it is not a Peterson Number. Question 6: [15] Write a program to accept a sentence from the user. Display the new String by extracting he first character of each word and adding to the end of the word also extract the last character of the word and add it to the starting of the word. Change the first and last characters in uppercase Sample Input: Hard work is recipe to success Sample Output: DarH KorW SI EecipR OT SuccesS Question 7: Write a java program to input 10 city names and their pin code. Arrange the cities in descending order of their pin code using Selection sort technique. [15] Question 8: [15] Write a program to accept a 3x3 matrices and store it in DDA. Calculate and display the sum of each column in the following manner: Sample Output : Array Entered: 2 5 4 3 1 2 4 6 3 Column 1 2 3 Sum of Column Entries 9 12 9 2023-24/Grade X/Preboard I/Computer Application Page 6 of 6

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


alisha7

(7)

meera5

(5)

eloraaa

(5)

guptag

(5)

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

 

anwesharay chat