170k views
4 votes
Assuming a is a bool with a value of false, which of the following evaluates to true?

A) !(!a)
B) a
C) !a
D) None of the above

1 Answer

3 votes

Final answer:

The correct statement that evaluates to true, assuming 'a' is a Boolean with the value of false, is C) !a. The negation of false is true, making it the correct option.

Step-by-step explanation:

Assuming a is a bool with a value of false, let's evaluate which of the following evaluates to true:

  • A) !(!a): The inner negation !a turns false (a) into true, and the outer negation turns it back to false. Therefore, A evaluates to false.
  • B) a: Since a is given as false, B evaluates to false.
  • C) !a: The negation of a which is false is true. Therefore, C evaluates to true.
  • D) None of the above: This is not the correct answer since C evaluates to true.

The correct answer is C) !a, since the negation of false is true.

User Eneko
by
7.1k points