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
What did the strict study generally find about the effect of internet use on sleep?
rjkz [21]
A. should be the answer hope this helps :)
4 0
4 years ago
Read 2 more answers
Which windows utility should you use to organize the files on your disk to improve efficiency?
olga55 [171]

<span>Disk Defragmenter, is a windows utility that rearranges the records and unused space on the PC's hard disk so that the operating system accesses data more rapidly and projects run quicker. Disk Defragmenter keeps running on a timetable, yet you can likewise break down and defragment your disk and drives manually.</span>

7 0
3 years ago
Which of the following best describes the infrastructure ISPs provide?
svet-max [94.6K]

Answer:

cables, towers, and underground tubes

Explanation:

Its certainly the above one, and through this internet service is being provided. So internet service is self-understood, and what ISP firstly provides are cables, underground tubes, and the towers. And it is only these all through which the ISP provides internet service. And remember we are in this question dealing with the infrastructure and not the services or products. Hence, phone service, websites, and files, as well as the emails, search engines, and the videos, are not the solution here as they are not the infrastructure. And ISPs never provide the computers, ethernet cables or keyboards.

Hence, the correct answer is as mentioned in the answer section.

4 0
4 years ago
What naming scheme identifies the rows in a worksheet?
masha68 [24]
The naming scheme that identifies the rows in a worksheet is B. 1, 2, 3.
Rows are horizontal, and they are identified by numbers in an Excel worksheet. On the other hand, columns are vertical, and they are identified by letters in the same Excel worksheet. 
7 0
3 years ago
Read 2 more answers
The type of software used widely in businesses to complete specific tasks is _____. application software programming language sy
hichkok12 [17]
The answer is  Application Software.
This type of software is widely used in business to complete specific tasks. These programs are designed for the users by the application developers. An example of Applications software is Microsoft Offices (Word, Excel, PowerPoint).
4 0
3 years ago
Read 2 more answers
Other questions:
  • What percentage of jobs work in the entertainment industry?
    13·1 answer
  • Can i still download an update for an xbox one game if it's not turned on
    13·1 answer
  • Questiul 2
    10·1 answer
  • Write a function all_cats that consumes a comma-separated string of animals and prints whether all of the animals have "cat" in
    12·1 answer
  • An aircraft departs an airport in the mountain standard time zone at 1615 MST for a 2-hour 15-minute flight to an airport locate
    14·1 answer
  • as the new hr manager hired by a company to clean up some of the company's problems,analyse the system requirements for the comp
    14·1 answer
  • What are the 4 features of the month-end review tool in quickbooks online accountant?
    14·1 answer
  • You are creating a story map about Mexico. After configuring the web app template, you launch the app to test it. When the app o
    13·1 answer
  • Write a simple algorithm in pseudocode that asks the user their favourite colour and then agrees with their choice, quoting the
    15·1 answer
  • Which of the following shows the correct order of inventions that helped the first computers make calculations?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!