1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ivann1987 [24]
3 years ago
7

Under which of the following conditions will evaluating this boolean expression

Computers and Technology
1 answer:
zzz [600]3 years ago
3 0
1.) 
<span>((i <= n) && (a[i] == 0)) || (((i >= n) && (a[i-1] == 0))) </span>

<span>The expression will be true IF the first part is true, or if the first part is false and the second part is true. This is because || uses "short circuit" evaluation. If the first term is true, then the second term is *never even evaluated*. </span>

<span>For || the expression is true if *either* part is true, and for && the expression is true only if *both* parts are true. </span>

<span>a.) (i <= n) || (i >= n) </span>

<span>This means that either, or both, of these terms is true. This isn't sufficient to make the original term true. </span>

<span>b.) (a[i] == 0) && (a[i-1] == 0) </span>

<span>This means that both of these terms are true. We substitute. </span>

<span>((i <= n) && true) || (((i >= n) && true)) </span>

<span>Remember that && is true only if both parts are true. So if you have x && true, then the truth depends entirely on x. Thus x && true is the same as just x. The above predicate reduces to: </span>

<span>(i <= n) || (i >= n) </span>

<span>This is clearly always true. </span>
You might be interested in
Which popular file format loses some of the information from the image? JPEG TIFF RAW NEF
lisov135 [29]

Answer:

The popular file format that loses some of the information from the image is JPEG

Explanation:

4 0
2 years ago
Fill in the table below of the Interactive Word Wall. You are provided with the
kakasveta [241]

Answer:

that is so long i just want points

Explanation:

7 0
2 years ago
Que se encarga de notar lo que pasa alrededor
Angelina_Jolie [31]

Answer: Es nuestro cerebro. Los ojos son las estructuras capaces de transformar las señales luminosas en impulsos eléctricos, los cuales viajan al cerebro y, una vez ahí, él se encarga de transformar estas señales eléctricas en lo que vemos realmente. Y lo mismo pasa con todos los otros sentidos.

Explanation:

7 0
3 years ago
What is the best way to pay for college?
Virty [35]

Answer:

I think it would be Federal student loans if I am sure sorry if you get it wrong.

Explanation:

3 0
2 years ago
Read 2 more answers
Alexis plans to stop trading once she lose 5% of her account balance, her account balance is $215.00. How much money is she will
irina1246 [14]

Answer:

She's willing to lose $10.75.

Explanation:

$215.00 * .05 = answer

         or

$215.00 * .95 = x

$215.00 - x = answer

7 0
2 years ago
Other questions:
  • Your browsing the Internet and realize your browser is not responding which of the following will allow you to immediately exit
    14·2 answers
  • How is marketing related to the other functions of a business
    14·1 answer
  • What is the subnet mask ?
    9·2 answers
  • A friend was just promoted to a new job that requires part-time travel, and he has also been promised a new laptop after his fir
    10·1 answer
  • What is the most difficult part of working with the Help system?
    8·1 answer
  • Write the definition of a class WeatherForecast that provides the following behavior (methods): A method called set_skies that h
    13·1 answer
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
  • Employing the use of a(n) <br> will help you manage a STEM project.
    13·1 answer
  • Writers in our networked world enhance their credibility by
    5·1 answer
  • Question 7 (1 point)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!