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
What would be the best thing you could do to prepare yourself to work for a company that has embraced globalization. A) learn ho
laila [671]

Answer:B

Explanation: your co workers might not know English so you would need to learn their language :)

5 0
4 years ago
Read 2 more answers
What is difference between augmented reality and mixed reality?​
weqwewe [10]

Answer:

Explanation:

Augmented reality (AR) overlays computer-generated content on top of the real world. ... Mixed reality (MR) is like AR on steroïds in that it projects 3D digital content that is spacially aware and responsive. With mixed reality, virtual objects become part of the real world

7 0
3 years ago
6) Which of the following an OPERATING SYSTEM? a) Window 7 b) excel c) PowerPoint d) Publisher​
Anastaziya [24]

Answer: windows is an operating system

5 0
1 year ago
Stuck on where to go with this one.
garri49 [273]

1

7

6 I think how many do you have to answer

8 0
3 years ago
Question 4: What will be the output of the code? Show a complete analysis.
Eva8 [605]

Answer:

The output of the code is 8

4 0
4 years ago
Other questions:
  • Computer architecture:
    6·1 answer
  • Direct Mapped Cache. Memory is byte addressable. Fill in the missing fields based upon the properties of a direct-mapped cache.
    6·1 answer
  • A computer processes data using only 1s and 0s true or false?
    9·2 answers
  • How does violating the SOLID principles make code hard to test?
    5·1 answer
  • I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outs
    9·1 answer
  • Mencione algunos ejemplos en donde sean utilizadas las máquinas de aire comprimido. Justifique su respuesta.
    7·1 answer
  • Will mark brainliest
    14·1 answer
  • NO LINKS Please
    8·2 answers
  • When conducting memory and recall tests, some people make an effort to normalize memories by not reporting extreme cases. this l
    12·1 answer
  • hich of the following is different on the Cisco switch CLI for a Layer 2 switch as compared with the Cisco router CLI?a. The com
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!