Questions

Q:

What is the output after compile and run the following code ?

int Output = 10;
boolean b = false;
if((b == true) && ((Output += 10) == 20))
{
System.out.println("We are equal " + Output);
}
else
{
System.out.println("Not equal! " + Output);
}

A) Compilation and output of "We are equal 10" B) Compilation and output of "Not equal! 10"
C) Compilation error, attempting to perform binary comparison on logical data type D) Compilation and output of "Not equal! 20"
 
Answer & Explanation Answer: B) Compilation and output of "Not equal! 10"

Explanation:

The output will be "Not equal! 10". Please note that && is logical AND operator. If first operand before (&&) is false then the other operand will not be evaluated. This illustrates that the Output +=10 calculation was never performed because processing stopped after the first operand was evaluated to be false. If you change the value of b1 to true, processing occurs as you would expect and the output would be "We are equal 20".

Report Error

View Answer Report Error Discuss

Filed Under: Oracle Certification
Job Role: Analyst

12 14718
Q:

Which is the largest City of Nepal?

 

A) Hetauda B) Pokhara
C) Biratnagar D) Kathmandu
 
Answer & Explanation Answer: D) Kathmandu

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Country Capitals
Exam Prep: Bank Exams

11 14685
Q:

Which of the following countries enjoys a federal form of government

A) China B) USA
C) Cuba D) Belgium
 
Answer & Explanation Answer: B) USA

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

16 14662
Q:

A cube of edge 15 cm is immersed completely in a rectangular vessel containing water . If the dimensions of the base of vessel are 20 cm x 15 cm, find the rise in water level

 

A) 11.25cm B) 11.56cm
C) 11.66cm D) 10.86cm
 
Answer & Explanation Answer: A) 11.25cm

Explanation:

Increase in volume = Volume of the cube = (15 x 15 x 15) cm3.

 

\Rise in water level = volume/area = (15 x 15 x 15)/(20 x 15) cm = 11.25 cm.

Report Error

View Answer Report Error Discuss

7 14660
Q:

What has One Eye Yet cannot See?

A) One-eyed Jack B) A Needle
C) Blind Justice D) Hurricane eye
 
Answer & Explanation Answer: B) A Needle

Explanation:

What has one eye yet cannot see is An Eye of a Needle.

 

A needle has an eye through which we thread it but it is not for seeing.

Report Error

View Answer Report Error Discuss

8 14657
Q:

Who was the first Indian ruler who had territory outside India ?

A) Kanishka B) Chandra Guptha Maurya
C) Huvishka D) Ashoka
 
Answer & Explanation Answer: A) Kanishka

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

50 14656
Q:

Which value is reflected in Heracles?

A) taking care of one’s children. B) disobeying the rules to achieve one’s goals.
C) disobeying the gods to follow one’s path. D) taking responsibility for one’s actions.
 
Answer & Explanation Answer: D) taking responsibility for one’s actions.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

27 14629
Q:

During rainy season wooden doors are difficult to open or closure because of  ?

A) Imbibition B) Plasmolysis
C) Diffusion D) Osmosis
 
Answer & Explanation Answer: A) Imbibition

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams

92 14625