Computer Science - Object Oriented Programming Using C++ - Discussion


Evaluate the following expression: 3 >6&&7>4

[A]. True
[B]. False

Answer: Option B


No answer description available for this question.

Mayu said: (Jun 7, 2011)  
Whats the use of && operator here?

Geetha said: (Jul 6, 2011)  
&& (comparision between two oprands) in the above two conditions are false so the ans is false.

&&: It check two conditions true the result is true otherwise false. If one condition is true other condition is false then again the ans is false.

Sheetal said: (Nov 9, 2011)  
3 is not greater than 6 i.e 3>6=false.
7 is greater than 4 i.e 7>4=true
single & is used for logical & operation,while && is used for comparison of conditions therefore it is false

Mukesh said: (Dec 13, 2011)  
3 is not greater than 6 i.e 3>6=false.
7 is greater than 4 i.e 7>4=true
Single & is used for logical & operation,while && is used for comparison of conditions therefore it is false.

Divya said: (Mar 15, 2012)  
Ya its right the use Of && is for comparison thereby here answer is false.

Azlan Tanveer said: (Apr 5, 2012)  
&& operator is comes under logical operator, if all operands i.e. conditions are true it evaluates to true and if any one or more than one or all of them are wrong it will evaluate to false.

It is necessary that all conditions should be true.

Noora said: (Apr 17, 2012)  
3>6 is false
7>4 is true

In this expression AND condition is used
In and if one statement is false all result is false 3>6&&7>4

Shariq said: (Sep 17, 2012)  
First condition evaluated is 3>6 which is not true, condition is not checked further.

After which, if it was written 3<6, which is true then only second condition is tested for its trueness or false,

Let us consider condition before && evaluated true.

2 cases arise if the next condition is true or not.

Accordingly then, use of && operator states if any one of i/p is false then result is false.

Tharun said: (Jul 8, 2013)  
Hear the internal concept is logical operator (&&).

And according to the bit-wise operator (AND '^') we use and hear 3>6 is false we consider it is 0 and 7>4 is true we consider it is 1.

According to the truth table 0^1 is 0. It means false.

Faisal said: (Jul 13, 2013)  
There are two conditions if one false then return false.

e.g. Both conditions must be true.

1*0 = 0.
1*1 = 1.
0 = false.
1 = true.

Sumit said: (Jul 16, 2013)  
In the expression the priority of various operator is as follow && (AND) than || (OR) than ! (NOT).

So here we have only and operator which means the expression is only true when both the condition is true.

Here 2nd condition is true but the first condition is false.

So expression is false.

Pawan said: (Aug 2, 2013)  
In && Operator if the (left side of && )first Condition False then compiler don't check the Condition(right side of &&) after the && operator.

3 > 6 && 7 > 4

3 > 76 false then no need of evaluate 7 > 4.

Prajakta said: (Jan 22, 2014)  
&&:it is a logical and operator in which result is true only when.

Both conditions are true otherwise result is false.

3>6 && 7>4.

false && true.


Sapsarala said: (Jul 12, 2014)  
Ya 3>6 is false and using of && so this statement is false.

Michael Samonte said: (Feb 18, 2015)  
&& is a logical operator that is true only if both are true, otherwise, it is false.

Amit Kumar said: (Sep 6, 2015)  
Because of in general way if we will look then here is the used operator is AND and In && operator if both the conditions are true then only the output or result would be true otherwise result would be false. As 3 is not greater than 6 hence the answer is false for this.

Sourabh said: (Nov 8, 2015)  
In these expression we compare two condition if both of the condition returns true then the it returns truth value. Here && operand is a is a Logical AND, it checks both the given Condition.

3>6 i.e. FALSE.

7>4 i.e TRUE.


Hence, the answer is false.

Vrushabh said: (Jul 25, 2016)  
3>6 is false and we used && operator which gives the combined result as false.

Bilal Munniwale said: (Feb 9, 2018)  
Whats the use of && operator here?

Amarjeet Singh said: (Aug 20, 2018)  
Here the condition 3>6 && 7>4 becomes false but in this, the compiler only checks first condition 3>6 because in the case of logical and (&&) operator if the first condition becomes false then there is no need of checking the second condition.

Apart from this, if the first condition becomes true then compiler go for checking the second condition.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.