ICSE X/ Sample Test,Sample questions

Question:
 An array is assed by____________ to a user defined function.

1.Reference

2.Value

3.Address

4.Index

Posted Date:-2022-01-17 01:03:52


Question:
(2<3&cde40>6)

1.True

2.False

Posted Date:-2022-01-17 03:46:13


Question:
(c)______________;

1.k<=n;

2.k<=n;

3.k+n;

Posted Date:-2022-01-17 04:42:50


Question:
(d)_______________)
{System.out.printin(k);
}

1.k+=2

2.k+=5

3.k++

Posted Date:-2022-01-17 04:47:10


Question:
{
Case A: System.out.print in ("Honest")
Case B:System.out.print In ("Hardwork")
Case C:System.out.print In ("Success")
default :System.outprint in ("Failure")
when x='d'

1.Honest

2.Hardwork

3.Failure

Posted Date:-2022-01-17 04:17:27


Question:
{
print ( int m, (e)______________)
}

1.int n

2.double n

3.char n

Posted Date:-2022-01-17 04:52:56


Question:
A loop statement within another looping statement is termed as

1.Nested loop

2.Nested

3.Nested if

Posted Date:-2022-01-17 06:29:29


Question:
An interface with no fields or method Is known as___________.

1.Runnable interface

2.Market interface

3.Abstract interface

4.Charsequence interface

Posted Date:-2022-01-17 03:35:23


Question:
An OOPs program can contain______________ no. of classes.

1.only 999

2.Only 100

3.only 1

4.Any number

Posted Date:-2022-01-17 01:10:07


Question:
Billingtnew BillingO
t.input();
(f)_______________________
tprint0
()

1.t.input()

2.t.calculate()

3.t.print()

Posted Date:-2022-01-17 05:48:14


Question:
Choose the odd one

1.Inheritance

2.Data abstraction

3.Portable

4.Data hiding

Posted Date:-2022-01-17 03:52:14


Question:
Choose the odd one

1.>=

2.==

3.&&

4.<=

Posted Date:-2022-01-17 03:53:05


Question:
Choose the odd one

1.code reusability

2.Efficient code

3.Duplicate/redundant data

4.Modularity

Posted Date:-2022-01-17 03:54:27


Question:
Choose the odd one

1.Inheritance

2.Reusability

3.Base class and sub class

4.Private

Posted Date:-2022-01-17 03:55:53


Question:
Choose the odd one

1.int var

2.int VAR

3.int Lvar

4.tnt vart

Posted Date:-2022-01-17 03:57:13


Question:
class (a)____________

1.POLIMORPH

2.polimarph

3.class

Posted Date:-2022-01-17 04:27:41


Question:
class (a)_____________
int noc; double bill;
String n ;

1.Billing

2.class

3.object

Posted Date:-2022-01-17 05:03:49


Question:
Do loop executes at least once.

1.True

2.False

Posted Date:-2022-01-17 03:47:34


Question:
else bill=(e)______________.
void print0
System.out.printin("Name = "+n)
System.out.println("Amount to be paid="+bill);
void main ()

1.bill=0(n-100)*2.50

2.bill=0(n-100)*3.50

3.bill=n*2.50

Posted Date:-2022-01-17 05:46:04


Question:
Give the output of the following
 a+= a++    + ++a+-- a+a-- ; [ a=7 ]

1.37

2.40

3.39

4.38

Posted Date:-2022-01-17 04:07:01


Question:
if ( (f)____________________)
return true;
else
return false;

1.if(n%m == 0)

2.if(m%n == 0)

3.if(m/n == 0) [1]

Posted Date:-2022-01-17 04:56:02


Question:
if (a>b)

{
System.out. println(a+b)
}
else
{
System.out.println (a*b);
}
when a=5 and b=7

1.12, 35

2.35

3.35, 12

Posted Date:-2022-01-17 04:13:10


Question:
import java.io."
public class (a)________________

1.mul

2.multiply

3.multi

Posted Date:-2022-01-17 05:55:14


Question:
n-100
while (n> 10)
n-T/10;
System.out.printin(n);

How many time the loop is executed and what is the output?

1.Loop is executed 2 times and the output is 100

2.Loop is executed 3 times and the output is 10

3.Loop is executed 1 times and the output is 10.

Posted Date:-2022-01-17 04:20:00


Question:
Name given for sequence breaking of flow either forward or backward is

1.Looping

2.Decision Control

3.Jump statement

Posted Date:-2022-01-17 06:33:15


Question:
Name the type of error in the statement given below:
int a; b; c;

1.Syntax

2.Runtime

3.Logical

4.Warning

Posted Date:-2022-01-17 00:10:23


Question:
Operators with higher precedence are evaluated before operators with relatively lower precedence. Arrange the operators given below in order of higher precedence to lower precedence.

(i) &&
(ii) %
(iii) >=
(iv) ++

1.(iv)(i)(iii)(ii)

2.(iv)(iii)(ii)(ii)

3.(iv)(ii)(iii)(i)

4.(i)(ii)(iii)(iv)

Posted Date:-2022-01-17 00:02:12


Question:
Package containing the Random class?

1.java.util.package 2

2.java.langpackage

3.java.awt package

4.java.io.package

Posted Date:-2022-01-17 03:31:41


Question:
public static void main(String args|) throws IOException
int n, t;
BufferedReader br new BufferedReader(new InputStreamReader(System.in));
String s br.readLine0:
n Integer.parselnt(s):
for(int k=1; (b)______________k++)

1.k<10

2.k>0

3.k<=10

Posted Date:-2022-01-17 06:02:29


Question:
Scanner ob = (b)_________________Scanner(System.in);
void input()
{

1.old

2.new

3.void

Posted Date:-2022-01-17 05:08:57


Question:
Scope of local variable is with in a class.

1.True

2.False

Posted Date:-2022-01-17 03:46:46


Question:
Software package providing Java class libraries.

1.JDK

2.JRE

3.JVM

4.None of these

Posted Date:-2022-01-17 01:15:34


Question:
State True Or False
(a) string is a non primitive data type

1.True

2.False

Posted Date:-2022-01-17 03:43:38


Question:
System.out.println("Enter Number of units"
noc =(c) ________________
System.out.println("Enter name ")
n=ob.next();

1.ob.nextDouble()

2.ob.nextLine()

3.ob.nextInt()

Posted Date:-2022-01-17 05:11:16


Question:
System.out.println(n+"(d)______________" +k+ "+" + t);

1.*

2.+

3.=

Posted Date:-2022-01-17 06:11:20


Question:
t=(c)_____________*n;

1.k

2.t

3.n

Posted Date:-2022-01-17 06:09:40


Question:
The _______________ allows to combine the methods with its data where they are defined to work.

1.Inheritance

2.Polymorphism

3.Encapsulation

4.None of the above

Posted Date:-2022-01-17 00:11:55


Question:
The ________________ is called the factory of the object.

1.Class

2.Attributes

3.State

4.None of these

Posted Date:-2022-01-17 01:01:37


Question:
The comparison operator( == ) is left associative

1.True

2.False

Posted Date:-2022-01-17 03:48:17


Question:
The keyword that represents the corent object is:

1.Now

2.This

3.Corrent

4.None

Posted Date:-2022-01-17 03:36:15


Question:
The method with the same name as of the class and which does not have a return data type is called
as

1.Constructor

2.Function

3.Method

4.Class

Posted Date:-2022-01-17 03:33:50


Question:
The number of bytes occupied by int data type is___________byte/s

1.4

2.8

3.2

4.None of these

Posted Date:-2022-01-17 00:58:42


Question:
void calculate()
{
if ( (d)__________________bill =0;

1.noc< = 100

2.noc=0

3.noc>100

Posted Date:-2022-01-17 05:20:23


Question:
void print (int n)
int k;
(b)___________________

1.k=1

2.k=n

3.k=0

Posted Date:-2022-01-17 04:34:34


Question:
What are the looping statements in java ?

1.if and switch

2.for, do and while

3.ternary and logical

Posted Date:-2022-01-17 06:25:54


Question:
What is the final value stored in variable x ?
double x = Math.pow ("345". index of (5), 3);

1.8.0

2.7.0

3.16

4.4

Posted Date:-2022-01-17 00:09:22


Question:
Where can a function in Java be written?

1. Inside a class

2.Outside a class

3.Inside main () function

4.None

Posted Date:-2022-01-17 00:04:54


Question:
Which of the following are valid KEYWORD?
(i) class
(ii) object
(iii) extends
(iv) instance

1.(i) & (iii)

2.(i) & (ii)

3.all of these

4.None of these

Posted Date:-2022-01-16 23:57:46


Question:
Which of the following does not executive once ?

1.for (k = 1; k<=10;k++)

2.for (k = 1; k==10;k++)

3.for (k = 1; k<10;k++)

Posted Date:-2022-01-17 06:38:00


More MCQS

  1. help4info.com
  2. help4info.com
  3. help4info.com
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!