Comp - QP - ICSE CLASS X
Comp - QP - ICSE CLASS X
Computer Science
Q1. The algorithm in which the middle index is found and the array is divided into 2
halves to search for an element is called:
Options
Q2. Write statements to show how finding the length of a character array char[]
differs from finding the length of a String object str.
Options
Q3. State the total size in bytes, of the arrays a[4] of char data type and p[4] of float
data type.
Options
Options
(a) 6
(b) 7
(c) 8
(d) 9
Options
Options
Q7. The process of converting wrapper class object to primitive data type is called :
Options
(a) Boxing
(b) Unboxing
(c) Conversion
(d) Post Boxing
Options
(a) 3
(b) 0
(c) 2
(d) 1
Q9. Among the following Statements, Which are true about Constructors?
(I) a new operator automatically calls them.
(II) they cannot be private
(III) they cannot be virtual
Options
a) I & III
b) I & II
c) II & III
d) All of the above
Options
Options
Options
(a) 5 digits
(b) 7 digits
(c) 15 digits
(d) 10 digits
Q13. What is the type and value of the following expression? (Notice the integer
division) – 4 + 1/2 + 2*–3 + 5.0
Options
(a) int -5
(b) double -4.5
(c) int -4
(d) double –5.0
Options
(a) 5
(b) 4
(c) 1
(d) 0
Q15. How The Scanner class method used to accept words with space:
Options
(a) next()
(b) nextLine()
(c) nextString()
(d) None of these
Options
(a) 16.0
(b) 16
(c) 4.0
(d) 5.0
Q17. The absence of which statement leads to fall through situation in which case
statement?
Options
(a) continue
(b) break
(c) return
(d) System.exit(0)
Options
(a) POSI
(b) POS
(c) MPO
(d) MPOS
Options
(a) implicit
(b) automatic
(c) explicit
(d) coercion
Q20. A method which does not modify the value of variables is termed as:
Options
Options
Q2. In the program given below, state the name and the value of the:
if (a > b | | a > c)
System.out.println(a);
x* = – – x + x + + + x
while(n>0)
{d = n%10; System.out.println(d);
n = n/100; }
char ch = ‘d’;
int n = ch + 5;
Q1. Write a program to accept a list of 20 integers. Sort the first 10 numbers in
ascending order and next the 10 numbers in descending order by using ‘Bubble Sort’
technique. Finally, print the complete list of integers.
Q2. Design a class to accept a string (one word) and convert it into uppercase. Now
check and print if it is a ‘No vowel’ word or not. A word is a ‘No vowel’ word, if it does
not contain any vowel in it.
Input: rhythm
Output: RHYTHM
No Vowel word
Q4. Write a class with name employee and basic as its data member, to find the
gross pay of an employee of the following allowances and deduction. Use
meaningful variable.
Dearness Allowance = 25% of Basic pay House Rent Allowance = 15% of Basic pay
Provident Fund = 8.33% of Basic Pay
Net Pay = Basic Pay + Dearness Allowance + House Rent Allowance
Gross Pay = Net Pay – Provident fund