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

6 5250
Q:

Cellulose is a

A) Mineral B) Protein
C) Fat D) Carbohydrate
 
Answer & Explanation Answer: D) Carbohydrate

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

15 5244
Q:

Which company has launched the world's first automated opening bandsets, titled PEBL, in the Indian Market?

A) Nokia B) Motorola
C) Samsung D) LG
 
Answer & Explanation Answer: B) Motorola

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

26 5234
Q:

Which category of Hydrogen releases water vapour and a by product when burnt?

 

A) Green Hydrogen B) Blue Hydrogen
C) Red Hydrogen D) Black Hydrogen
 
Answer & Explanation Answer: A) Green Hydrogen

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams

2 5233
Q:

Which is the first Indian company to be listed on NASDAQ ?

A) Reliance B) TCS
C) HCL D) Infosys
 
Answer & Explanation Answer: D) Infosys

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

12 5232
Q:

The National institute of Oceangraphy is located at

A) Goa B) Mumbai
C) Cochin D) Kandla
 
Answer & Explanation Answer: A) Goa

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

8 5231
Q:

You can use ______ to copy selected text, and ____to paste it in a document

A) CTRL+C, CTRL+V B) CTRL+C, CTRL+P
C) SHIFT+C, ALT+V D) SHIFT+C, ALT+P
 
Answer & Explanation Answer: A) CTRL+C, CTRL+V

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams
Job Role: Bank PO

26 5227
Q:

Which is the highest gallantry award in India?

A) Param Vir Chakra B) Kirti Chakra
C) Vir Chakra D) Param Vishishtat Seva Medal
 
Answer & Explanation Answer: A) Param Vir Chakra

Explanation:

Param Vir Chakra (PVC) is India's highest military decoration awarded for the displaying distinguished acts of valor during the war.

 

Ashok Chakra Award – An Indian military decoration awarded for valour, courageous action or self-sacrifice away from the battlefield. It is the peacetime equivalent of the Param Vir Chakra.

Kirti Chakra – Second in order of precedence of peacetime gallantry awards.


Maha Vir Chakra (MVC) is literally called a great warrior medal. Vir Chakra is an Indian gallantry award presented for acts of bravery in the wars.

Report Error

View Answer Report Error Discuss

Filed Under: Honours and Awards
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

3 5226