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 is the recommended solution to configure this automated behavior? UC has a requirement that an opportunity should have a fi
Dmitry_Shevchenko [17]
The answer will need to be workflow.
8 0
3 years ago
What is MARC? Discuss structure of MARC
nordsb [41]
What do you mean? I don't understand.
7 0
2 years ago
A device capable of copying a graphic, document, or other object is called a
Amiraneli [1.4K]
A printing press or printer
5 0
3 years ago
Read 2 more answers
Memorex Disks sells computer disk drives with right-of-return privileges. Returns are material and reasonably predictable. Memor
pychu [463]

Memorex should: iv. record a refund liability in the year of the sale.

<h3>What is a right-of-return privilege?</h3>

A right-of-return privilege can be defined as a special right, advantage or entitlement that is accorded to a customer, which avails them an opportunity to return a product they have purchased.

Since Memorex Disks offers its customers right-of-return privileges, it is expected that it should record a refund liability in the year of the sale i.e recording an allowance for sales returns in the year the sale was made.

Read more on right-of-return privilege here: brainly.com/question/17165436

#SPJ1

5 0
2 years ago
What does DOS stand for?
anygoal [31]

Answer:

Disk Operating System

Explanation:

"DOS is a platform-independent acronym for Disk Operating System which later became a common shorthand for disk-based operating systems on IBM PC compatibles."

5 0
3 years ago
Other questions:
  • which of these paste options is commonly available from the paste options button? A&gt; use the destination them. B. keep the em
    14·2 answers
  • Mirrors on cars exist to____.
    7·2 answers
  • You can use the ____ utility to zero in on the service or other program that is slowing down startup. 1. gpupdate 2. MSconfig 3.
    9·1 answer
  • Write a grammar for the language consisting of strings built only of the letters a and b. The strings may have any number of the
    6·1 answer
  • John works in the Sales and Marketing group. Why does his group need to interact with operations management to plan the launch o
    12·1 answer
  • Charlie does not think he will be able to finish his project by the deadline at this point in the decision making progress to so
    13·1 answer
  • What are search tries? Why are they more efficient than usualsearching<br><br> algorithms?
    8·1 answer
  • What is the purpose of "display:table"?
    10·1 answer
  • A ____ is a a set of presentation rules that control how text should look. It is applied to an XML file to change the collection
    9·1 answer
  • What are the top 10 most dangerous computer viruses ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!