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
Bond [772]
3 years ago
7

Given the following code segment, what is output after "result = "? int x = 1, y = 1, z = 1; y = y + z; x = x + y; cout <<

"result = " << (x < y ? y : x) << endl;
a. 2
b. 3
c. 4
d. 1
Computers and Technology
1 answer:
Katyanochek1 [597]3 years ago
4 0

Answer:

The answer is "Option b".

Explanation:

  • In the C++ language program code, there are four integer type variable is defined that is "x, y,z, and result" in which variable x,y,z holds a value that is "1" and the variable result does not hold any value.  
  • In the next line, variable y holds added value of variable y and z, which is equal to 2. and variable x holds added value of variable x and y, which is equal to 3.
  • In the next line, a Ternary Operator is defined, it is similar to an if-else statement. This operator checks if x variable value is less then y. If this condition is true, it will print y variable value Otherwise, it will print x variable value. That's why the out to this question is "option b".
You might be interested in
What are the disadvantages of using grid analysis to help make decisions?
alekssr [168]

Answer:

Grid analysis is best used when a decision needs to consider multiple outcomes and different criteria. The format of this method however, can provide bias to a certain outcome. The process is only as good as the quality of information placed within the grid including the scoring. Once a factor is graded or placed subjectively, objectivity is compromised in this method. Also, this method keeps decision making strictly in a rational manner. But, it is considered unhealthy to be linear in decision making and one-sided. It is best to base decisions from a rational and take emotions into account as well.

7 0
2 years ago
Read 2 more answers
What can a human till do better and fater than any Machine Learning (ML) olution?
Gemiola [76]

Judge the quality of any given data can a human till do better and fater than any Machine Learning (ML).

<h3>What is Machine Learning (ML)?</h3>
  • Switch between fields of expertise. a thorough understanding of the facts' meaning. Check the veracity of any information that is provided.
  • According to some scientists, AI will replace jobs with a single output. A mental task may also be mechanized in the future if it can be finished by a person in less than a second.
  • Expressing empathy, making others feel good, taking care of others, expressing feelings and vulnerability in a sympathetic way, and making people laugh are all examples of being creative and artistic for the purpose of being creative. The personal touch is important in most occupations and, in certain cases, it completes the task entirely.
  • Machines can perform as well as or better than humans in some tasks, despite their slower rate of development.

To learn more about Machine Learning (ML) refert to:

brainly.com/question/25523571

#SPJ4

5 0
10 months ago
Crossing out answers that could not possibly be correct is called ‘eliminating answers.’ Please select the best answer from the
BaLLatris [955]

The correct answer is True.

Explanation

When we must solve a multiple-choice test or exam, in most cases, we are asked to select only one choice from four or more options. This means we need to know which is the correct answer from the options given to obtain a good grade. Due to this, we must be very precise when responding and paying attention to details because many times the answers are very similar, but only one contains all the elements that answer the question.

One of the most used methods to do this is "eliminating answers" this means we discard answers that we are sure are not possible answers by crossing out these and leaving only the correct answer or a few possible correct answers, in this case, we will need to analyze the remaining answers to select the most appropriate. So, the correct answer is True.

6 0
3 years ago
Read 2 more answers
Software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundam
alukav5142 [94]

Answer:An operating system, or "OS," is software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundamental files your computer needs to boot up and function.

Explanation:

8 0
2 years ago
Why should we be concerned about HVAC systems when discussing security?
lana66690 [7]

Answer:

 HVAC is stand for the heating, ventilation and the air conditioning system that basically perform various type computer management and operation system. It also helps to improve the productivity of the system.

 As, HVAC system is very concerned about the security as it basically include various types of toxic chemical in the environment that include various types of criminal and terrorist activities and natural disaster.

The HVAC systems are easily cause various accidental cases due to its complexity nature. It also performing various types of function in the management sector like maintenance, system updating function an remote controlling maintenance.

4 0
3 years ago
Other questions:
  • 10. Which of these is not an HTTP verb? PUT AJAX GET DELETE
    12·1 answer
  • WILL UPVOTE NEED ANSWERS ASAP i have till 4:30
    12·1 answer
  • Ead the following scenario and then answer the question.
    10·1 answer
  • When using a wireless mouse, what is the most common port used for the transmitter? 
    7·1 answer
  • \Read the sentence.
    12·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I question 3<br> need correct the answers to all
    12·1 answer
  • Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brain
    7·1 answer
  • What does it mean to be self demanding?
    12·1 answer
  • Consider the following method.
    14·1 answer
  • Explain impact of modern technology on human life​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!