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]
2 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]2 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]2 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
Once Google Analytics processes data, it’s stored in a database where it can’t be modified.
Svet_ta [14]

Answer:

The answer to this question is true.

Explanation:

Google Analytics is the method of free tracking device which is offered by Google. Google Analytics shows how User visits website. It helps you exactly see the number of visitors that you store in the database.

It offers information about user behavior that can be critical for your business. The google Analytics refers a reference number which cannot be modified .So the given statement is true.

6 0
3 years ago
Synthesizing information can be done by creating
Maurinko [17]

Answer:

D

Explanation:

because you use all of those

4 0
3 years ago
Read 2 more answers
application that will perform a lot of overwrites and deletes of data and requires the latest information to be available anytim
o-na [289]

Answer:

RDS.

Explanation:

A corporation has implemented a software that conducts the number of information overwriting and deleting, which allows the newest details to be accessible whenever the information is examined. As a Software Engineer, they suggest RDS database technologies.

It is an AWS supported controlled SQL DB service that also reinforces the array type DB for the purpose to contain and maintain the information.

3 0
3 years ago
Software is the brain of computer. Explain this starement
Annette [7]

here you go

i hope this helps you

5 0
3 years ago
Which tab in Microsoft Word provides access to the backstage view?
ivann1987 [24]
The answer is control windows
6 0
3 years ago
Read 2 more answers
Other questions:
  • 32.
    11·1 answer
  • Constantine forms the following hypothesis. Let n be any non-negative number that meets the following condition: when n is divid
    10·1 answer
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • Componets of computer
    5·1 answer
  • What is output when the CarTest application is run? Why?
    11·1 answer
  • What feature of a word processing program helps you to easily check and correct spelling mistakes?
    9·1 answer
  • Write a program that calculates the average of N integers. The program should prompt the
    12·1 answer
  • 1 pts Question 5 Which of the following calculations would evaluate to 12? (36) + 2/2, 3* ((6+2)/2), 3* 6+2/2, (306+ 2)/2​
    14·1 answer
  • Which display technology was developed by apple, produces vibrant colors, and supports viewing from all angles?
    12·1 answer
  • What does an arrow after a command indicate
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!