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
How to be gud at Friday night funk
Likurg_2 [28]

Answer:

There is an article on this topic.

Type in Friday Night Funkin: 10 Beginner Tips

Explanation:

3 0
3 years ago
What is a database backup, and how is it used?
Evgen [1.6K]

Answer:

A database backup is the process to make a copy of all the stored data of a database software in case the database has problems and the information is lost.

Explanation:

A database backup is a way to protect the information and people will use it to be able to restore all the data if there is any problem with the database.

6 0
3 years ago
Which hardware device should he consider upgrading in order to increase the system's storage space?
Mademuasel [1]
The hard drive because this is where all the information is stored.
7 0
4 years ago
What is 4365 −3412 when these values represent
Inessa [10]

The result of the subtraction of 4365 and 3412 using octal numbers is of:

753.

<h3>What are octal numbers?</h3>

For octal numbers, each number is represented by three bits, as follows:

  • 0 = 000.
  • 1 = 001.
  • 2 = 010.
  • 3 = 011.
  • 4 = 100.
  • 5 = 101.
  • 6 = 110.
  • 7 = 111.

Then the binary representation of number 4365 is given as follows:

100011110101

The binary representation of number 3412 is given as follows:

011100001010

Then the following binary subtraction is made:

100011110101 - 011100001010

The result of this subtraction is of:

100011110101 - 011100001010 = 111101011

Then the octal result is given as follows:

111 101 011 = 753.

More can be learned about binary numbers at brainly.com/question/8649831

#SPJ1

4 0
1 year ago
48. Which of the following can be used in the name of a variable?
aleksley [76]

Answer:

Alphabet and digits

Explanation:

A digit cannot be placed at the start of a variable name, but it can be used after the first character has been placed

6 0
3 years ago
Other questions:
  • What type of electronic monitoring involves an offender being contacted periodically by telephone or beeper to verify his or her
    5·1 answer
  • Kindly answer in Just 7,8 lines please
    7·1 answer
  • Which option describes the purpose of configuring native supplicant profile on the cisco ise?
    7·1 answer
  • What term is used to describe an individual's money and personal property? budget income assets finances
    12·2 answers
  • When at the rightmost cell in a row, press the ENTER key to move to the first cell in the next row; do not press the TAB key.
    14·1 answer
  • Cuales son mis fortalezas como estudiantes
    14·1 answer
  • 9.18 LAB: Exact change - methods Write a program with total change amount as an integer input that outputs the change using the
    11·1 answer
  • When creating envelopes, how will you adjust the layout?
    10·2 answers
  • Hey i need some help with code.org practice. I was doing a code for finding the mean median and range. the code is supposed to b
    14·1 answer
  • The Program Manager just received approval of his proposed acquisition strategy with one exception: he has been directed to make
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!