Multiple Choice Question

Quiz Guidelines

 

QID: 
321
Question: 

Consider the following lines of code:

boolean greenLight = true;
boolean pedestrian = false;
boolean rightTurn = true;
boolean otherLane = false;
You can go ahead only if  the following expression evaluates to 'true' :
(( (rightTurn && !pedestrian || otherLane) || ( ? && !pedestrian &&
greenLight ) )  == true )

What variables can you put in place of '?' so that you can go ahead?

Select 1 option

A. rightTurn
B. otherLane
C. Any variable would do.
D. None of the variable would allow to go.

Q&A Set: