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
Why do we have to watch a video to get answers?
IRINA_888 [86]

Answer:

The videos contain the answers.

Explanation:

4 0
3 years ago
Read 2 more answers
Charlie wants you to include the following topics in your presntation: an overview of project management and its hrity,a descrip
maxonik [38]

Answer:

Explanation:

Project management is the process of planning, designing and implementing a project in an organized way to achieve the goals of an organization.

The project management process includes various activities like,

Definition – Initializing the project, identifying the needs

Planning – Organizing the activities and schedule the tasks

Execution – Coordinating people and resources and implement the tasks

Control – Monitoring the implementations, ensuring the objectives and goals

Closing – Acceptance of the project.

Task identification:

• Tasks are derived from the project deliverables and the requirements of the deliverables and the goals.

• All activities required for a complete process are to be identified.

• Identify intermediate deliverables for each major component

Relationships among tasks

The tasks can be interrelated. Start of completion of one task may depend on the start or end of another task. There can be four types of relationships among the tasks. They are:

• Finish-to-start – Task (B) cannot start until task (A) finishes

• Start-to-Start - Task (B) cannot start until task (A) starts

• Finish-to-Finish - Task (B) cannot finish until task (A) finishes

• Start-to-Finish - Task (B) cannot finish until task (A) starts

Schedule development:

Schedule development depends on the requirement, resources, duration and end date of the project. It provides a basis for monitoring the project progress.

• Gantt chart, PERT, CPM are the tools used to represent the project schedule.

• Gantt chart is the common tool for displaying project schedule information. They are easy to create and understand.

• These tools are useful at many stages of project management.

• They give critical path and slack time. Provide project documentation. They are useful in monitoring costs

4 0
4 years ago
What are the benefits of using disk cleanup as part of regular maintenance on a computer​
Morgarella [4.7K]

Your computer will absolutely benefit. Disk Cleanup is a Windows tool that lets you clean junk files and temporary files that are no longer needed, thus increasing space and performance.

4 0
3 years ago
What helps in determining the reliability of a person to repay debt?
faust18 [17]

C. The amount of credit score

3 0
3 years ago
Read 2 more answers
Explain the process of creating a switch statement to replace an if-then-else statement in Java.
musickatia [10]

Answer:

The answer to this question is given in the explanation section.

Explanation:

Let look at an if the else statement

if (condition1) {

 //some code if condition 1 is true

} else if (condition2) {

 // some code if condition 2 is true

} else {

 // some code if condition 3 is true

}

No let look at switch statement

switch(expression) {

 case x:

   // code block

   break;

 case y:

   // code block

   break;

 default:

   // code block

Now let look at your answer.

if then else should be replaced with switch if conditions are fixed.

in the process of replacing

write your condition of if statement  in the case area of swatch

7 0
3 years ago
Other questions:
  • Francis works in the human resources division of a large oil and gas company in Texas. Francis' tasks include maintaining payrol
    14·1 answer
  • ____ is a programming language used to view and manipulate data that is stored in a database.
    6·1 answer
  • A list of pages within a Web site that you have visited and that usually appears at the top of a page is referred to as a(n) ___
    14·1 answer
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • Rate monotonic Analysis (RMA) is a model for predicting whether or not a system will meet its timing as well as throughput requi
    6·1 answer
  • How does cryptocurrency exchange software works?
    14·1 answer
  • What is the difference between arithmetic and logical operations​
    8·1 answer
  • &lt;
    6·1 answer
  • What type of error occurred??
    10·1 answer
  • state how to transfee information from website to el processing document in computers and technology.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!