Trending ▼   ResFinder  

ICSE Prelims 2016 : Computer Science (Shantiniketan Trust School, Bangalore)

4 pages, 0 questions, 0 questions with responses, 0 total responses,    0    0
Namratha Simha
Shantiniketan Trust School, Bangalore
+Fave Message
 Home > namratha_simha123 >   F Also featured on: School Page

Formatting page ...

SHANTINIKETAN TRUST SCHOOL #70 BILEKAHALLI, BANGALORE-76 II PREPARATORY EXAMINATION 2014-2015 SUB : COMPUTER APPLICATIONS Std. X ICSE 100 Total Marks : 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 given for writing the answers. _____________________________________________________________________ This paper is divided into two Sections. Attempt all questions from Section A and any four question from Section B. The intended marks for questions or parts of questions are given in brackets(). _____________________________________________________________________ Section A (This section consists of 40 marks. All the questions are compulsory.) Q1. A) What is the maximum value that the following statement will evaluate to? (int)( Math.random() * 6 ); B) What is Java API? C) What will be the result of the following? (a) ~(1011) (b) 1110<<2 (1) Q2. A) Explain block scope with an example program. B) Give the syntax of the do-while loop. C) What is the difference between formal and actual parameters? (3) (1) Q3.A) Why are arrays and classes called reference types? B) What will be the result of the following : i)rint(20.51); ii)abs(-18.5); C) Explain the difference between implicit and explicit type conversion. Q4.A) What is a boolean expression? B) What will be the output of: int ctr=1; outer: for(int i=1 ; i<=5 ; i++) (2) (2) (2) (2) (2) (2) (1) (3) { for(int j=2 ; j<=6 ; j++) { System.out.println( j : +j); if(j==4) break outer; } } System.out.println( i= +i+ j= +j); C) What do you mean by Fall-through in switch-case? (2) Q5.A) Write the wrapper class functions to do the following : i) Return a float primitive value from an object of float type. ii)Convert a short primitive type to String type. B) Write the code for an infinite loop. C) Write the output : boolean k; k=( school .length()> class .length())?true:false; System.out.println( k= +k); (2) (1) (1) Q6. A) Write the code to display the ASCII value of the character 'P'. (1) B) Write the equivalent while loop for the following code: (2) int x=20,s,i; for(i=0,s=0;i<x;i++) s+=i; System.out.println(s); C) Write the function prototype of a public function calcVol() which takes one integer value and one float value as parameters and returns a double value. (1) Q7. A) How many times will the following loop get executed? int m=30; while(true) { if(m==15) break; m=m-5; } System.out.println(m); B) The data type of array elements is known as the _________. C) Why is class called as an object factory? (2) (1) Q8. A) What do you mean by selection / decision construct? (2) B) What is the range of indices (subscripts) that the following arrays can have? (2) a. char x[]=new char[6]; b. int j[]={2,4,6,8,10,12,14}; (2) Section B (This section consists of 60 marks. There are 6 questions. Each question carries 15 marks. Attempt any 4 questions from this section.) (Each program should be written using Variable descriptions/Mnemonic codes such that the logic of the program is clearly depicted. Flowcharts and Algorithms are not required.) Q9. Write a program which contains 2 classes Account and AccountDemo. The class Account contains the following members: Variables - accountNum (int type) and balance(double type). Functions a parameterized constructor, deposit() - updates the balance by taking the deposit amount as parameter., withdraw() - updates the balance by taking the withdrawal amount as parameter, display() - displays the values of the member variables. The class Accountdemo contains the following function. main() - creates an object and calls the above functions. (15) Q10. Write a java program to print the following series : 1 + 2 + 1+2+3 +......+ 1+2+3...+n 1x2 1x2x3 1x2x3.....xn where the value of n is accepted from the user. (15) Q11. Write a program to store 6 elements in array1 and 4 elements in array2. Create a 3rd array to store the elements of both array1 and array2. (i.e. merge the 2 arrays) (15) Q12. Write a menu-driven program to do the following: if choice = 1, accept a number from the user and display whether it is a prime number or not. If choice = 2, accept a number from the user and display it s factorial. (Ex.The factorial of 3=3x2x1=6) (15) Q13. Write a program that offers a menu to choose from various categories of Cinema hall tickets. After the user selects a category, ask for the number of tickets he/she wants to buy and then display the total cost of the tickets. The price list is given below : 1. Lower Stall Rs.50/2. Upper Stall Rs.70/3. Balcony Rs.90/4. Box Rs.120/(15) Q14. Write a program to accept a string and from the user and display the longest word in the string and also it's size. (15) XXXXXXXXXXXXXXXXXXXXXXX

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

namratha_simha123 chat