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]
4 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]4 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
Do macs run with the same internal hardware as pc
Gennadij [26K]
No macs have a different internal because apple runs faster
5 0
3 years ago
A system that organizes and controls website content and can include features that help team members work together on webpages a
BlackZzzverrR [31]

Answer:

A system that organizes and controls website content and can include features that help team members work together on webpages and other documents is referred to as a​ __groupware__ system.

Explanation:

Groupware is also know as collaborative software. This software allows multiple people to works collectively in solving a problem. It helps solving problems in an easier and in an efficient manner, because anyone in the group can solve it. It is a sort of group/team work.

3 0
3 years ago
i replaced my thermal paste with ketchup and now my pc is getting hot i tried putting my cat in the microwave but it didn't work
ankoles [38]

use your cat's urine instead of ketchup

3 0
3 years ago
Read 2 more answers
As we move up a energy pyrimad the amount of a energy avaliable to each level of consumers
AleksandrR [38]

Explanation:

As it progresses high around an atmosphere, the amount of power through each tropic stage reduces. Little enough as 10% including its power is passed towards the next layer at every primary producers; the remainder is essentially wasted as heat by physiological activities.

8 0
3 years ago
ANSWER QUICKLIY
lidiya [134]

Answer:

Explanation:

Allow you to view the document in different ways. Sorry if I am wrong. I am dumb

God bless, stay safe, and good luck! :)

4 0
3 years ago
Read 2 more answers
Other questions:
  • Because of the limited storage capacity of __________, it is unsafe to talk on a cell phone while driving on a freeway during ru
    7·1 answer
  • How does heat affect quantum computers ?
    10·1 answer
  • Create a website for an online movie rental store, using HTML (and any other client technologies) and PHP. The website should in
    8·1 answer
  • In which type of land contract does the seller earn interest on the difference between what the seller owes on an existing loan
    14·1 answer
  • (Please select 2)
    14·1 answer
  • Writa function to read content from "Zone. txt" and write it into another file "zone1. txt" by reversing each line if the line s
    15·1 answer
  • Write a C class, Flower, that has three member variables of type string, int, and float, which respectively represent the name o
    12·1 answer
  • A _____ is relatively inexpensive to install and is well-suited to workgroups and users who are not anchored to a specific desk
    14·1 answer
  • 1. In platform construction, wall-framing members include sole plates,
    15·2 answers
  • You are given the following design parameters, fill in the table: All memory addresses are 32-bit long; A 64Kbyte (2^16 byte) ca
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!