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
What will be the output of the following pseudocode?
Integer p, q, r
Set p = 8, q = 3, r = 14
q = (p + q) + q
q = 11 ^ r
q = q + r
q = (r ^ 6) & r
Print p + q + r
Integer p, q, r
Set p = 8, q = 3, r = 14
q = (p + q) + q
q = 11 ^ r
q = q + r
q = (r ^ 6) & r
Print p + q + r
Which will be the output of the following pseudocode?
Integer p, q, r
Set p = 1, q = 2, r = 4
for(each r from 4 to 7){
q = (r + 11) & p
if((q + 6) > (r -q))
continue
Else
Jump out of the loop
End if
q = r + q
End for
Print p + q
Integer p, q, r
Set p = 1, q = 2, r = 4
for(each r from 4 to 7){
q = (r + 11) & p
if((q + 6) > (r -q))
continue
Else
Jump out of the loop
End if
q = r + q
End for
Print p + q
What will be the output of the following pseudocode?
Integer p, q, r
Set p = 4, q = 4, r = 8
q = 8 + r
if((p + q) < (q-p))
if((p ^ q ^ r) < (q + r + p))
r = (11 & 7) ^ p
p = (11 ^ 8) + q
End if
q = (p + q) + r
End if
q = (p + q) + r
Print p + q + r
Integer p, q, r
Set p = 4, q = 4, r = 8
q = 8 + r
if((p + q) < (q-p))
if((p ^ q ^ r) < (q + r + p))
r = (11 & 7) ^ p
p = (11 ^ 8) + q
End if
q = (p + q) + r
End if
q = (p + q) + r
Print p + q + r
Will the following code compile correctly?
abstract class AirPlane{
abstract void fly();
void land(){//Line 3
System.out.println("Landing ........");
}
}
class AirJet extends AirPlane{
AirJet(){
super();//Line 9
}
void fly(){
System.out.println("Flying ........");
}
}
abstract class AirPlane{
abstract void fly();
void land(){//Line 3
System.out.println("Landing ........");
}
}
class AirJet extends AirPlane{
AirJet(){
super();//Line 9
}
void fly(){
System.out.println("Flying ........");
}
}
What will be the output of the following code?
class A{
int i=10;
public void printValue(){
System.out.print("Value-A ");
}
}
class B extends A{
int i=12;
public void printValue(){
System.out.print("Value-B ");
}
}
public class Main
{
public static void main(String[] args) {
A a=new B();
a.printValue();
System.out.println(a.i);
}
}
class A{
int i=10;
public void printValue(){
System.out.print("Value-A ");
}
}
class B extends A{
int i=12;
public void printValue(){
System.out.print("Value-B ");
}
}
public class Main
{
public static void main(String[] args) {
A a=new B();
a.printValue();
System.out.println(a.i);
}
}
What will be the output?
public class Main
{
public static void main(String[] args) {
int num1, num2;
try{
num1 = 0;
num2 = 62/num1;
System.out.println("Try block message");
System.exit(0);
} catch(ArithmeticException e){
System.out.println("Error : Don't divide a number by zero");
System.exit(0);
} finally {
System.out.println("Give another number of num1");
}
}
}
public class Main
{
public static void main(String[] args) {
int num1, num2;
try{
num1 = 0;
num2 = 62/num1;
System.out.println("Try block message");
System.exit(0);
} catch(ArithmeticException e){
System.out.println("Error : Don't divide a number by zero");
System.exit(0);
} finally {
System.out.println("Give another number of num1");
}
}
}
Choose the correct option.
Which code segment should be used in place of missing Statement in the below code such that it displays the list of all root directories of the available system?
// Missing Statement
for(int i=0;i<dirs.length;i++)
System.out.println("Root["+i+"] : "+dirs[i]);
Which code segment should be used in place of missing Statement in the below code such that it displays the list of all root directories of the available system?
// Missing Statement
for(int i=0;i<dirs.length;i++)
System.out.println("Root["+i+"] : "+dirs[i]);
What is true about the WITH GRANT OPTION clause?
Anonymous Quiz
25%
It is used to grant an object privilege on a foreign key column
30%
It allows the grantee to grant object privileges to other users and roles
14%
It required syntax for privileges
15%
It allows a grantee DBA privileges
16%
It allows privileges on specified columns of tables