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
In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital
Vesnalui [34]

Answer: False

Explanation:

As for the encoding process we require encoder, decoder, modulator which is less expensive than those required for modulation where we need devices for changing the amplitude, frequency and phase, which is more complex and expensive

3 0
3 years ago
Write a program that passes an unspecified number of integers from command line and displays their total.
Svetradugi [14.3K]

Answer:

Explanation:

I will go straight to the code, and hope it didn't confuse you.

Here is it

public static void main(String[] args)

int [] x = new int [args.length]

for (int y = 0; y< args.length;yi++)

int[y] = (int) args [y]

5 0
2 years ago
in a stop-and-wait arq system, the bandwidth of the line is 1 mbps, and 1 bit takes 10 ms to make a round trip. if the system da
MArishka [77]

Answer:

٢٣٤

Explanation:

5 0
2 years ago
Your company has a team of remote workers that need to use Windows-based software to develop company applications, but your team
timofeeve [1]

Operating systems are the software that supports the basic functioning of the computer. Windows Virtual Desktop is an Azure compute service that will help solve the problem.

<h3>What is Windows Virtual Desktop?</h3>

Windows Virtual Desktop is an app virtualization service of Azure that operates on the cloud platform. It includes standard operating procedures that can be used by users with multiple OS.

Azure's Virtual Desktop supports different versions of window OS. This type of system is majorly used in remote work demands and specialized workloads.

Therefore, Windows Virtual Desktop is an Azure compute service.

Learn more about Azures service here:

brainly.com/question/13144160

#SPJ1

5 0
1 year ago
Suppose you have four 500 MB hard drives plus one 2 GB flash drive. How many GB of capacity is this overall?
Sidana [21]

You would have a total of 2.5 GB of capacity.

A gigabyte consists of 1000 megabytes, so 500 megabytes make half of a gigabyte, or 0.5 gigabytes.

So 2GB + 0.5GB = 2.5GB

4 0
2 years ago
Other questions:
  • The front surface of the CCD is called the _________
    11·1 answer
  • You can access a button s screentip by _____.
    6·1 answer
  • When should recursion be avoided?
    9·1 answer
  • Columns are labeled with letters and Rows are labeled with numbers.
    5·1 answer
  • Can you send photos through messages on here?
    6·2 answers
  • What are the three basic classes of application
    14·2 answers
  • What is the CSS property used to style text as all lowercase or uppercase?
    14·2 answers
  • Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?
    10·1 answer
  • Microsoft vs Sony who wins ​
    13·2 answers
  • What is keyboard? answer me <br>​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!