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
Which is a feature of a search engine? stores web pages belonging to a single website displays web pages within a browser finds
faltersainse [42]
Finds web pages that matches key words
8 0
3 years ago
Cultural differences may make it difficult for team members to _____. Select 4 options.
ludmilkaskok [199]

Answer:

A) collaborate with each other

C) achieve business objectives

D) understand each other

E) resolve conflict and problems

Explanation:

Well lets use the process of elimination. If there are cultural differences then there are different cultures involved. So B doesn't work because it's multicultural when there is different cultures. And you need 4 answers out of 5, so all you need to do is eliminate one answer.

Good Luck! You got this!

6 0
3 years ago
List and the deference between MS access objects​
Dafna11 [192]

Answer:

MS access objects help the user list , information and designed reports .

Explanation:

MS access objects are create a forms, data base, tables,queries, and modules. There are many objects are following:-Tables, Forms,Reports, Queries.

Table:- These are objects used into a define and store the data,tables are contain the columns and the store of different data.

Form:- Form is the object that designed by the data input and control application queries or tables, forms are used in viewing records.

Reports:- Reports are the designed to the printing and calculating data,reports are used because data in read to easy format.

Queries:- Queries are provides that data from one or more table,you can define the update ,delete, insert, select data.

4 0
4 years ago
Which of these statements correctly defines source code?
Ksju [112]

Answer:

B.  code written in a high-level language

Explanation:

8 0
4 years ago
g Define a function called most_frequent_letter which takes no arguments. This function will return a dictionary which will have
skad [1K]

Answer:

def most_frequent_letter():

   file = open("words","r")

   dWords = {}

   for line in file:

       line = line.rstrip()

       words = line.split(" ")

       for word in words:

           counts = {}

           for c in word:

               counts[c] = counts.get(c, 0) + 1

           dWords[word] = max(counts, key=counts.get)

   return dWords

print(most_frequent_letter())

Explanation:

the file used was words in txt format and its contents are as follows:

hello aamir jan khan

parallelogram abdullah

anaconda ali

pycharm notebook

3 0
3 years ago
Other questions:
  • If a program repeatedly shows separate feature branches rather than a true System Demo, which practice should be reviewed to add
    5·1 answer
  • Which network service would you use to get the ip address from the fqdn hostname?
    7·1 answer
  • ____ port is a connection in which eight data lines transmit an entire byte of data at one moment in time.
    12·1 answer
  • Importance of project risk management
    10·1 answer
  • Short Answer: Computer models and simulations are used to formulate, refine, and test hypotheses. Describe a scenario that could
    8·1 answer
  • Of the key reasons for creating organizational units which of the following is not one of them?
    13·1 answer
  • What does network administration normally include? Check all of the boxes that apply.
    8·1 answer
  • What are the primary IP addresses for DNS servers hosted on the x128bit, iskytap and cloudparadox domains
    8·1 answer
  • Which area located at the top of the word screen includes home , insert , and page layout ?
    13·2 answers
  • Plz help
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!