F=!(i>10) will have what value

Recommended Answers

That's a boolean expression, so the value of F will be true or false dependent on the value of i. The ! (NOT) operator in the expression inverts the result of the i>10 comparison.

So if the value of i is greater than 10, the result of the expression i>10 …

Jump to Post

All 2 Replies

That's a boolean expression, so the value of F will be true or false dependent on the value of i. The ! (NOT) operator in the expression inverts the result of the i>10 comparison.

So if the value of i is greater than 10, the result of the expression i>10 is true, the ! operator inverts it to false. Therefore if i is greater than 10, the value of F will be false.

Likewise, if i is less than or equal to 10, the value of F will be true - because the result of the expression i>10 will be false and the ! operator inverts the value to true.

ok i got it ...
thankx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.