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
Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas
Mama L [17]

Answer:

Explanation:

The system will be deadlock free if the below two conditions holds :

Proof below:

Suppose N = Summation of all Need(i), A = Addition of all Allocation(i), M = Addition of all Max(i). Use contradiction to prove.

Suppose this system isn't deadlock free. If a deadlock state exists, then A = m due to the fact that there's only one kind of resource and resources can be requested and released only one at a time.

Condition B, N + A equals M < m + n. Equals N + m < m + n. And we get N < n. It means that at least one process i that Need(i) = 0.

Condition A, Pi can let out at least 1 resource. So there will be n-1 processes sharing m resources now, Condition a and b still hold. In respect to the argument, No process will wait forever or permanently, so there's no deadlock.

5 0
3 years ago
The disk drive is a secondary storage device that stores data by _____ encoding it onto a spinning circular disk.
Lisa [10]
Magnetically





------------------------------
8 0
3 years ago
Many interpretations of Hamlet exist, from long to short, from serious to humorous, and each calls attention to different aspect
madam [21]

Answer:

This video presents only the most important points in the plot:

the appearance of Hamlet's father's ghost

Claudius's efforts to determine the cause of Hamlet's strange behavior

Hamlet's soliloquy

Hamlet's rudeness to Ophelia, which leaves her heart-broken

the staging of the play, after which Hamlet is certain of Claudius's guilt

the scene in which Hamlet loses an opportunity to kill Claudius

the scene in which Hamlet rebukes his mother and then accidentally kills Polonius

Claudius's plan to kill Hamlet, which he shares with Laertes

the scene in the graveyard, in which Hamlet holds Yorick's skull

the scuffle between Laertes and Hamlet when Ophelia is buried

the duel between Laertes and Hamlet, followed by Gertrude's death, Hamlet's killing of Claudius, and Hamlet's death

The quick succession of events in this video seems to suggest that the sequence of events in the play is rather unlikely.

The major themes of the play, such as appearance versus reality, moral corruption, the complexity of action, and the mystery of death are not evident in this adaptation. Other important aspects of the play that the video does not address are the question of Hamlet's madness, his internal conflict, and his inaction. The video ignores characterization in Hamlet and the treatment of philosophical ideas throughout the play.

PLATO answer

Explanation:

PLATO said so

6 0
3 years ago
How would it be feasible to combine both formats in a single disk?
Lunna [17]

It be feasible to combine both formats in a single disk are Field \lenght should be placed after the information saved withinside the area to expose in which it ends.

<h3>What is fixed-length area and variable length?</h3>

Fixed-length method having a fixed length that by no means varies. In database systems, an area will have a hard and fast or a variable period. A variable-period area is one whose period may be special in every document, relying on what information is saved withinside the are.

  1. You should determine what number of characters it is able to contain. If a area is of the variable period then an End-Of-Field marker should be placed after the information is saved withinside the area to expose in which it ends.
  2. If a document incorporates a few fields that have variable lengths then the document period can be variable.
  3. it's miles feasible to mix each constant period and variable period on a single disk.

Read more about the single disk:

brainly.com/question/11600913

#SPJ1

8 0
2 years ago
Workplace communication can sulfur when individuals
Goshia [24]
Workplace communication can suffer when individuals of that workplace tend to keep to them self and get aggressive
3 0
3 years ago
Other questions:
  • The term ________ refers to the use of a single unifying device that handles media, Internet, entertainment, and telephone needs
    7·1 answer
  • Guys helppppppppppppp!! plxxx <br> give me the right answer !
    7·1 answer
  • Daniela’s company has made the decision to allow employees to work from home as the company has outgrown their physical space. K
    13·1 answer
  • After which stage in the information processing cycle can data be referred for future use?
    7·1 answer
  • In which of the following situations will a macro make your work more efficient?
    9·1 answer
  • Your computer has a single hard disk w/ a single volume used by the C:\ drive. You have previously upgraded the disk to a dynami
    6·1 answer
  • Which symbol is at the beginning and end of a multiline comment block? &amp;&amp;&amp; """ %%% ###
    5·1 answer
  • Some commands listed in a menu cannot be selected.<br><br><br> True or False
    13·2 answers
  • I WILL MARK IT BRAINLIEST FOR SURE ☺️❤️
    13·1 answer
  • which responses would you use for a computer or electronic medical record outage? (select all that apply)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!