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
m_a_m_a [10]
3 years ago
15

The ____ operator executes one of two expressions based on the results of a conditional expression. Group of answer choices

Computers and Technology
2 answers:
Mars2501 [29]3 years ago
8 0

Corrected or Complet Question

The ____ operator executes one of two expressions based on the results of a conditional expression.

a. .

b. ( )

c. ,

d. ?:

Answer:

(d) ? :

Explanation:

The ternary operator (? :) is an operator that executes one out of two expressions based on the results of a conditional expression. It is a faster or shorthand way of writing an if ... else statement. The operator checks the conditional expression and depending on whether it is true or false, one of its two statements will be executed. For example:

 String correct = (4 < 5) ? "yes" : "no" ;

In the code above,

i. the conditional statement is (4 < 5) and this will be tested for to return true or false.

ii. the first expression (the one after the ?) is "yes" which will be executed if the conditional statement returns true.

iii. and the second expression (the one after the : ) is "no" which will be executed if the conditional statement returns false.

Therefore, since the conditional expression returns true for 4 < 5, the first expression will be executed. i.e "yes". This means that the String variable <em>correct </em> will have a value of "yes".

tia_tia [17]3 years ago
7 0

Answer:

Conditional operator ?:                            

Explanation:

  • The conditional operator evaluates a condition and chooses one of the two expressions which depends on whether the condition evaluated to true or false.
  • The syntax of conditional statement is given below:

            conditional_expression ? expression1 : expression2;

  • Basically this operator takes three operands/expressions and if the first expression ( a conditional expression) evaluates to true then this means that the second expression is evaluated/executed and if the first expression evaluates to false then the third expression is evaluated.
  • Example:

                 int number = 16;

                 number%2 == 0 ? cout<<"even number" : cout<<"odd number";

  • This statement first checks the conditional expression number%2==0 is true or false.
  • Value of number variable is 16 and here % is the modulo operator which calculates the remainder after dividing one number by another.
  • So 16%2==0 because 16 is divisible by 2 and gives 8 as quotient and 0 as remainder.
  • So the conditional statement is true it means that the first expression will be executed.
  • Hence the output will be: even number
You might be interested in
Gabe wants to move text from one document to another document he should __
musickatia [10]

The best way to move text from one document to another is to copy it to the clipboard on the computer and then paste it on the new document.

In order to move the text, Gabe will need to select (highlight) the text that he wants to copy and then copy it. He can copy it by clicking on the copy icon or right click and choose copy. This step places the text on the clipboard. The next step is to place the cursor in the new document and then click the paste icon or right click and choose paste. This will move the text from one document to another.

3 0
3 years ago
Read 2 more answers
there are 3 numbers X,Y,Z such that twice X is equal to therice Y and four times Y is equal to five times Z. the ratio between X
777dan777 [17]

Step-by-step explanation:

2x = 3y

4y = 5z

x = 3y/2

z = 4y/5

ratio between x and z is 15 : 8

3 0
3 years ago
Which of the following is NOT a cost typically associated with owning a car?
Arturiano [62]
A. fuel ; when you but a car you aren't buying the gas to go in it 
3 0
3 years ago
Which statement describes a feature of Oracle sequences? Oracle sequences generate a character string that can be assigned to ta
mylen [45]

Answer:

An Oracle sequence uses the identity column property to automatically number rows.

Explanation:

An Oracle sequence is a tool that can be used to generate a number sequence. Oracle has the capacity to help you create an auto-number field by using one of its tools called sequence.

A sequence is an object in Oracle that is used to generate a number sequence for input to a table. This is required when you need to generate primary key values by the use of identity columns.

So, Oracle sequence can automatically number rows by the use of identity columns.

8 0
3 years ago
Universal Containers uses an Auto-numbering system to uniquely identify each support request. They want customers to know this n
Nookie1986 [14]

Answer:

Following are the answers.

  • Auto-response Rules
  • Case Comment Notifications

Explanation:

They use the following system to determine that requirement for help in such a special manner. They need folks to identify the amount at the earliest opportunity. So, these Auto-response Rules and Case Comment Notifications are the functionalities that the System Admin implements to provide customers to easily obtain certain data are as follows.

8 0
3 years ago
Other questions:
  • Desktop, laptop, and tablet computers, and mobile devices are classified as _______.
    7·1 answer
  • What fields of engineering are in Biomedical
    7·1 answer
  • You and a few friends are having a meal at a pizza restaurant, and the server has just given you the bill. Write a function that
    14·1 answer
  • What X coordinate does the center of a game begin at?
    9·1 answer
  • Alguien me puede ayudar a arreglar mis auriculares que mi perro rompió en el conector
    5·1 answer
  • Four actions that can be implemented on a database to autocorrect violations of referential integrity, and the outcomes of the a
    15·1 answer
  • Neymar machine that Run on electricity
    11·1 answer
  • Why the internet is not considered a mass medium in Africa​
    13·2 answers
  • A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in
    15·1 answer
  • How can a classroom be more effective by the use of multimedia? ​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!