ICSE X/ Sample Test,Sample questions

Question:
 !(2<3&&40>6)

1.True

2.False

Posted Date:-2022-01-17 08:50:25


Question:
 if (a>b) 
 { System.out.println(a-b);
}
else
{
System.out.println (a%b);
}
when a= 7 and b = 5

1.2

2.1

3.35

Posted Date:-2022-01-17 09:14:58


Question:
 if(c>d)
xC
else
x= d;
predict the output

1. x= (c >d) ? d:d;

2.X(Cd) ?c:d;

3.x=(c >d) ? d:c

4. x= (c >d) ? d:d;

Posted Date:-2022-01-17 10:06:55


Question:
 switch (x)
{
case 'a' :System.out.println("Discipline");
case 'b': System.out.println ("Dedication");
break
case 'c' System.out.printn("Commitment");
default:System.out.println("Success");
}
when x-A

1.Discipline

2.Dedication

3.Success

Posted Date:-2022-01-17 09:19:31


Question:
?: are

1. Conditional operators

2.Arithmetic operators

3.Bitwise operator

4.Assignment operator

Posted Date:-2022-01-17 10:08:32


Question:
a=(d) _________________;

1.cnt

2.b

3.a

4.c

Posted Date:-2022-01-17 09:31:07


Question:
array is a non - primitive data type

1.True

2.False

Posted Date:-2022-01-17 08:49:25


Question:
b= (e) _______________;

1.cnt

2.a

3.b

4.c

Posted Date:-2022-01-17 09:31:53


Question:
c=(c)___________+b;
System.out.print(c);

1.cnt

2.c

3.a

4.b

Posted Date:-2022-01-17 09:29:43


Question:
Choose the odd one

1.>=

2.==

3.&

4.<=

Posted Date:-2022-01-17 08:56:29


Question:
Choose the odd one

1.return

2.break

3.continue

4.System.exit(0)

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


Question:
Choose the odd one

1.byte

2.double

3.char

4.String

Posted Date:-2022-01-17 08:59:26


Question:
Choose the odd one

1.++

2.%

3.- -

4.!

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


Question:
Choose the odd one

1.Object

2.Data abstraction

3.Member Function

4.Data Members

Posted Date:-2022-01-17 08:55:31


Question:
cnt++;

1.0

2.1

3.a

4.none

Posted Date:-2022-01-17 10:03:02


Question:
Do loop executes at least once.

1.True

2.False

Posted Date:-2022-01-17 08:51:47


Question:
If else Statement

1.One-way selection statement

2.Two-way selection statement

3.Multi-way selection statement

4.Multipath decision statement.

Posted Date:-2022-01-17 10:09:58


Question:
Invoking a function without passing parameters of a class is termed as

1.Call by value

2.call by reference

3.call by default

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


Question:
n-10;
while (n>-10)
n-n10;
System.out.println(n);

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

1.Loopis executed 2 times and the output is 100

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

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

4.Computer falls into infinite loop

Posted Date:-2022-01-17 09:21:08


Question:
Name the type of error in the statement given below:
Math.sqrt(36-45)

1.Syntax

2.Runtime

3.Logical

4.Warning

Posted Date:-2022-01-17 07:05:26


Question:
Operator that creates a new object and allocates memory for it.

1.create

2.add

3.allocate

4.new

Posted Date:-2022-01-17 08:40:08


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),(i)

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

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

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


Question:
public class (a)____________
{
public static void main(String args[])
}
intcnt= 2;
int a, b, c
a-0;
b (f);
System.out.println(a);
System.out.println(b)

1.ABC

2.Fab

3.fib

4.Num

Posted Date:-2022-01-17 09:26:52


Question:
Scope of the global variable is with in a class.

1.True

2.False

Posted Date:-2022-01-17 08:51:11


Question:
String x (a >=90)? "excellent": "best";
when a = 90

1.best

2.excellent

3.excellentbest

Posted Date:-2022-01-17 09:16:33


Question:
The ___________ are the names of data, method and class declared.

1.Keywords

2.Identifier

3.Methods

4.Package

Posted Date:-2022-01-17 07:59:43


Question:
The _____________ allows to define several methods with same name but different by their parameters types and number .

1.Inheritance

2.Polymorphism

3.Encapsulation

4.None of the above

Posted Date:-2022-01-17 07:14:42


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

1.True

2.False

Posted Date:-2022-01-17 08:53:54


Question:
The number of bytes occupied by double data type is _____________
byte/s.

1.4

2.8

3.2

4.None of these

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


Question:
The object is the combination of member function with its data member. Name of the property to
extend the features of the object is

1.Constructor

2.Inheritance

3.Method

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


Question:
The operator that deallocates the memory occupied by an object and deletes the object is _____________ .

1.remove

2.deallocate

3.delete

4.Erase

Posted Date:-2022-01-17 07:19:00


Question:
The special method having same name of its class is called ______________ .

1.Recursion

2.Iteration

3.Constructor

4.Member

Posted Date:-2022-01-17 08:01:41


Question:
The statement to stop the execution of a construct.

1.System.exit

2.break

3.STOP

Posted Date:-2022-01-17 08:43:53


Question:
The universal code generated from JVM is

1.Source code

2.Byte Code

3.Object code

Posted Date:-2022-01-17 08:40:54


Question:
What is the final value stored in variable x ?
double a-5.35;
double x= Math.abs(Math.floor(a);

1.9.0

2.7.0

3.6

4.7

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


Question:
What is the other name for Java Language?: Question Mark Colon Operator.?

1.Comparison Operator

2.If-Else Operator

3.Binary Operator

4.Ternary Operator

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


Question:
Which of the following is not a java feature?

1.Dynamic

2.Arichitecture Neutral

3.Use of pointers

4.Object-Oriented

Posted Date:-2022-01-17 07:03:06


Question:
Which of the following is not the string function?
(i) StrLen()
(ii) ToUpper()
(iii) Trim()
(iv) StrComp()

1.(i) & (ii)

2.(iii)

3.All of the above

4.None of the above

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


Question:
while((b)_____________<=10)

1.cnt

2.c

3.a

4.b

Posted Date:-2022-01-17 09:28:25


Question:
x+=x++ + ++ x+--1+X; [ x = 5 ]

1.29

2.28

3.26

4.25

Posted Date:-2022-01-17 09:05:31


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!