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 4985
Q:

Original name of Mumtaj Mahal was

A) Mihr-un-Nisa B) Jagat Gosami
C) Arjumand Banu D) Man Bai
 
Answer & Explanation Answer: C) Arjumand Banu

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

2 4984
Q:

A bond formed by the transfer of electrons betwwen atoms of the elements is called

A) ionic bond B) covalent bond
C) co ordinate bond D) none
 
Answer & Explanation Answer: A) ionic bond

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

8 4983
Q:

Two bulbs are fitted in a room in the domestic electric installation. One of them glows brighter than the other. Then

A) the brighter bulb has smaller resistance B) the brighter bulb has larger resistance
C) both the bulbs have the same resistance D) none of these
 
Answer & Explanation Answer: A) the brighter bulb has smaller resistance

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

9 4983
Q:

Cache memory acts between

A) CPU and Hard disc B) RAM and ROM
C) CPU and RAM D) None of the above
 
Answer & Explanation Answer: C) CPU and RAM

Explanation:

Cache memory is an extremely fast memory type that stores data so that future requests for that data can be served faster. It acts as a buffer between RAM and the CPU. It holds frequently requested data and instructions so that they are immediately available to the CPU when needed.

Report Error

View Answer Report Error Discuss

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

3 4981
Q:

What is the maximum velocity with which a body of mass 'm' must enter a vertical loop of radius 'R'so that it can complete the loop?

A) 0  B) gR   C)  2gR  D)  5gR

A) A B) B
C) C D) D
 
Answer & Explanation Answer: D) D

Explanation:

To complete the vertical loop, the minimum speed required at the lowest point  = 5gR.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , GATE
Job Role: Analyst

6 4980
Q:

The Legislature of the USA is known as the 

A) Commons B) Congress
C) Parliament D) Senate
 
Answer & Explanation Answer: B) Congress

Explanation:

The US Congress consists of two bodies 

a) the Senate and   b) the House of Representatives. The Senate, composed of 100 members (two Senators from each State), is a powerful body and exercises a very real influence in national affairs.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

24 4978
Q:

Which of the statements given below are correct?

1. The author of the novel 'Missile Gap' is Charles Stross.
2. The author of the novel 'Bird Box' is Victor LaValle.
3. The author of the novel 'The City and the City' is China Mieville.

A) 1 and 2 B) 2 and 3
C) 1 and 3 D) 1, 2 and 3
 
Answer & Explanation Answer: C) 1 and 3

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams

0 4977