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 are the value and data type (float, int, bool, or str) of this expression:<br><br> 5 % 2
amm1812

Answer: float

Explanation:

This is asking what would the remainder be of 5/2. I am not totally sure what you are asking but float is used with remainders because it could have a decimal like 3.33 that would throw an error for anything other than float.

3 0
2 years ago
A file type that allows a document to be read on most computers is a _____.
Travka [436]
Txt

Note, only Windows really cares about the file extension. OSX's Finder will use it if Finder can't find a creator in the file metadata to select an app when double clicking on it. Linux and Unix don't care.
7 0
3 years ago
Does anyone have code hs circle pyramid 2.0?
Andrews [41]

Answer:i dont

Explanation:

8 0
2 years ago
The blanks.<br>A<br>5x2=10<br>is a systematic display of information along with graphics​
Dima020 [189]
5x2 =69
Explication but brain
5 0
3 years ago
A bot can use a _______to capture keystrokes on the infected machine to retrieve sensitive information.
fgiga [73]

Answer:

keylogger.

Explanation:

A keylogger can be defined as a software program or hardware device designed for monitoring and recording the keystrokes entered by an end user through the keyboard of a computer system or mobile device.

Basically, a keylogger can be installed as a software application or plugged into the USB port of a computer system, so as to illegally keep a record of all the inputs or keys pressed on a keyboard by an end user.

In order to prevent cyber hackers from gaining access to your keystrokes, you should install an anti-malware software application such as Avira, McAfee, Avast, Bitdefender, Kaspersky, etc.

An antivirus utility is a software application or program that's used to scan, detect, remove and prevent computer viruses such as Malware, Trojan horses, keyloggers, botnets, adwares etc.

In conclusion, a bot can use a keylogger to capture keystrokes on the infected machine to retrieve sensitive information.

3 0
3 years ago
Other questions:
  • Rewrite this method so that it avoids the use of a return statement:
    15·1 answer
  • When did internet came to existence?
    12·1 answer
  • What is the difference between primary storage,secondary storage and offline storage what type of storage can be
    6·2 answers
  • Important tools used in the _____ phase of the DMAIC process include a project charter, a description of customer requirements,
    13·1 answer
  • Select the answer that best describes the activity
    5·2 answers
  • Minerals can form deep inside Earth’s crust by
    13·1 answer
  • A company wants to inform a select list of it's regular customers about a flash sale. Which type of platform will it use to send
    9·1 answer
  • The part of the computer that provides access to the Internet is the
    11·1 answer
  • In 1981, the first digital icons were launched for users in _________, which was the first computer with a GUI operating system.
    12·1 answer
  • The concurrent process model defines a set of "states." describe what these states represent in your own words, and then indicat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!