Choose the correct option.
How many times will the while loop executed for the given pseudocode?
Character c=125
while(c<128)
{
print c
c=c+1
}
How many times will the while loop executed for the given pseudocode?
Character c=125
while(c<128)
{
print c
c=c+1
}
public class MyClass {
public static void main(String args[]) {
class InnerTest
{
public String name;//Line 5
public InnerTest(String s){
name=s;//Line 7
}
}
Object c=new InnerTest("InnerTest");//Line 10
InnerTest t=(InnerTest)c;
System.out.println(t.name);
}
}
Choose the correct option.
What will be the output of the given code fragment.
public static void main(String args[]) {
class InnerTest
{
public String name;//Line 5
public InnerTest(String s){
name=s;//Line 7
}
}
Object c=new InnerTest("InnerTest");//Line 10
InnerTest t=(InnerTest)c;
System.out.println(t.name);
}
}
Choose the correct option.
What will be the output of the given code fragment.
A class CustomerDetails is required for storing customer details such as customerID and customerName. Also this class CustomerDetails should not be sub classed. Which option should be added in place of missing statement in the given code, such that the above mentioned condition satisfied?
//Missing Statement
{
int customerID;
String customerName;
}
//Missing Statement
{
int customerID;
String customerName;
}
Which is not a valid Constructor of Thread Class ?
Anonymous Quiz
22%
Thread(String name)
24%
Thread(ThreadGroup group, String name)
35%
Thread(int stackSize, int threadId)
19%
Thread(ThreadGroup group, Runnable target, String name)
Which types of exceptions/errors must be caught or specified with a throws clause in the method's declaration?
Anonymous Quiz
32%
Checked Exceptions and unchecked exceptions
29%
Checked Exceptions and Errors
19%
Unchecked Exceptions and Errors
19%
Checked Exceptions only
What will be the output of the following pseudocode for a=6,b=6,c=4?
Integer funn(Integer a,Integer b,Integer c)
c = b + c
c = 7 + c
if((5-3)<(10-b)ORa<b)
a=8+c
end if
b = 12 + b
a = (b + b) + b
return a + b + c
End function funn()
Integer funn(Integer a,Integer b,Integer c)
c = b + c
c = 7 + c
if((5-3)<(10-b)ORa<b)
a=8+c
end if
b = 12 + b
a = (b + b) + b
return a + b + c
End function funn()
What will be the output of the following pseudocode for a=8,b=6,c=9?
Integer funn(Integer a,Integer b,Integer c)
for(each c from 3 to 6)
b = 5 + a
if((c + a) > (a - c))
continue
Else
a = 7 + a
a = (a & b) + b
End if
End for
return a + b
End function funn()
Integer funn(Integer a,Integer b,Integer c)
for(each c from 3 to 6)
b = 5 + a
if((c + a) > (a - c))
continue
Else
a = 7 + a
a = (a & b) + b
End if
End for
return a + b
End function funn()
👍1
What will be the output of the following pseudocode?
Integer p, q, r
Set p = 8, q = 3, r = 10
for(Each r from 5 to 9)
p = q ^ r
if(9 < r)
continue
Else
Jump out of the loop
End if
p = 7 + q
End for
Print p + q
Integer p, q, r
Set p = 8, q = 3, r = 10
for(Each r from 5 to 9)
p = q ^ r
if(9 < r)
continue
Else
Jump out of the loop
End if
p = 7 + q
End for
Print p + q
What will be the output of the following pseudocode?
Integer j, m
Set m = 1
Integer a[4] = {1, 1, 0, 2}
a[0] = a[0] - a[1] + a[2]
a[1] = a[1] - a[2]
a[2] = a[2] - a[3]
a[3] = a[0]
m = a[3]
Print m
Integer j, m
Set m = 1
Integer a[4] = {1, 1, 0, 2}
a[0] = a[0] - a[1] + a[2]
a[1] = a[1] - a[2]
a[2] = a[2] - a[3]
a[3] = a[0]
m = a[3]
Print m
What will be the output of the following pseudocode?
Integer p, q, r
Set p = 4, q = 6, r = 8
q = 3 + q
for(each r from 4 to 5)
p = 6 + p
q = (q + q) + p
End for
Print p + q
Integer p, q, r
Set p = 4, q = 6, r = 8
q = 3 + q
for(each r from 4 to 5)
p = 6 + p
q = (q + q) + p
End for
Print p + q
What will be the output of the pseudocode?
Integer p, q, r;
Set p = 0, q = 6, r = 7
r = r + r
for(each r from 4 to 7)
q = (10 & 2) + q
End for
Print p + q
Integer p, q, r;
Set p = 0, q = 6, r = 7
r = r + r
for(each r from 4 to 7)
q = (10 & 2) + q
End for
Print p + q