Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

ICSE 10TH SEM2 MCQ PAPER

YP Computer Classes

YOGESH VERMA
www.YpComputerClasses.in
: 7798161873 / 8329686472 /
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→2
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→3
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→4
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 2

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→5
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 3
Choose the correct answer
(a) Which function is used to convert integer data type into string.?
(i) Integer.String()
(ii) Integer.intoString()
(iii) Integer.toString()
(iv) Integer.ToString()

(b) choose true or false for the given statement.


Working of Integer.parseInt() and Integer.valueOf() is same.
(i) true
(ii) false

(c) Which of the following keyword is used to create a class?


1. new
2. public
3. class
4. None of the above

(d) State the value of y after the following is executed:


char a=64
boolean y=Character.isWhiteSpace(32);
1. true
2. false

(e) Give the output of the following string methods:


"MISSISSIPPI".indexOf('S',3)+"MISSISSIPPI".lastIndexOf('I')

1. 14 2. 12
3. 13 4. 15

(f) The allows a class to use the properties and methods of another class.
1. Inheritance
2. Polymorphism
3. Encapsulation
4. None of the above

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→6
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
(g) Give the output of the following code:
String A ="26.0", B="74.0";
double C= Double .parseDouble(A);
double D = Double .parseDouble(B);
System.out.println(“ ”+(C+D));
1. 26.0 74.0
2. 100.0
3. 100
4. 26 74

(h) The keyword that differentiates class and instance variable.


1. final
2. void
3. this
4. static

(i) ___________terminates the execution of the program at that moment. Thus, the
execution of remaining statements of the program is ignored.
1. break
2. continue
3. System.exit(0)
4. return

(j) Access specifier used to make the member available only to the members of the class.
1. public
2. private
3. protected
4. default

Question 4
Choose the correct answer
(a) Which function is used to convert String data type into integer.?
(i) Integer.parseint()
(ii) Integer.toString()
(iii) Integer.parseInt()
(iv) Int.parseInteger()

(b) Choose true or false for the given statement.


Working of String.valueOf() and Integer.valueOf() is same.
(i) true
(ii) false

(c) Default value of string is _____________?


1. NULL
2. null
3. Null
4. None of the above

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→7
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
(d) State the value of y after the following is executed:
boolean y=Character.isWhiteSpace(‘\n’);
1. true
2. false

(e) Give the output of the following string methods:


"MISSISSIPPI".indexOf('S',6)+"MISSISSIPPI".IndexOf('s')

1. 5 2. 4
3. 6 4. 7

(f) System.out.print(“Comp”.compareTo(“Computer”));
1. -4
2. 4
3. >0
4. <0

(g) Give the output of the following code:


String A ="26.0", B="74.0";

double C= Double .parseDouble(A);

double D = Double .parseDouble(B);

System.out.println(C+D+“ ”);

1. 26.0 74.0
2. 100.0
3. 100
4. 26 74

(h) The keyword that makes variable constant variable.


1. final
2. void
3. this
4. static

(i) ___________terminates the execution of the program at that moment. Thus, the
execution of remaining statements of the program is ignored.
1. break
2. continue
3. System.exit(0)
4. return

(j) __________ is return type of parseLong() method..


1. String
2. long
3. Long
4. char

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→8
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 5
Choose the correct answer
(a) Data members and methods are accessible only in the same class where they are
declared and in the classes which are in the same package.?
i) public
ii) private
iii) protected
iv) default

(b) Choose true or false for the given statement.


The variable which are taken as formal parameters to any function are local variables.
i) true
ii) false

(c) Access specifier which is associated with inheritance _____________?


i) public
ii) private
iii) protected
iv) friendly

(d) In static variable, All objects share a common copy of the static variables:
i) true
ii) false

(e) Consider the following class:


Public class myClass
{
Public static int x=3, y=4;
Public int a=2, b=6;
}
Name the variables for which each object of the class will have its own distinct copy.

i) a, b ii) x, y
iii) a, b, x, y iv) None of these

(f) String x[] = {“Artificial intelligence”, “IOT”, “Machine learning”, “Big data”};
Give the output of the following statements:
System.out.println(x[2].substring(6, x.length+9);

1. ne learn
2. e learn
3. _learn (here underscore is space)
4. none of these
(g) If int x[] = {4, 3, 7, 8, 9,10}; what is the values of x[3]? [2]
int X = x[1] % x[0] + ++x[3] * x[5] / x[3]++;

i) 10
ii) 9
iii) 13
iv) None of these
***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→9
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
(h) Choose the incorrect initialization of array
i) double a[]={10.5, 30.5, 33.2};
ii) boolean b[]={“true”, “false”};
iii) char ch[]={‘1’, ’2’, ’3’};
iv) int ar[]={‘a’, ’b’, ’c’};

(i) State the total size in bytes of the arrays a[4] of byte data type.
i) 8
ii) 4
iii) 16
iv) 1

(j) At each stage, compares the sought key value with the key value of middle element of
the array.
i) selection search
ii) bubble search
iii) linear search
iv) binary search

Question 6

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→10
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 7

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→11
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→12
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 8

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→13
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 9

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→14
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→15
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 10

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→16
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 11

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→17
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 12

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→18
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************

Question 13

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→19
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 14

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→20
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 15

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→21
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 16

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→22
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 17

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→23
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 18

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→24
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 19

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→25
JMD-HGM YP COMPUTER CLASSES ICSE 10TH SEM2 MCQ
***************************************************************************************************************************************************
Question 20

***************************************************************************************************************************************************
Practice makes perfect www.YpComputerClasses.in (: 7798161873) P→26

You might also like