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
pantera1 [17]
3 years ago
7

After the following code is executed what will be displayed on the screen? bool correntEmployee = true; double empSalary = 45000

; if (correntEmployee) { if (empSalary < 45000) cout << "The employee needs a pay raise.\n"; else cout << "The employee pay rate is normal.\n"; } else cout << "This person is not an employee.\n";
Computers and Technology
1 answer:
AlexFokin [52]3 years ago
7 0

Answer:

"The employee pay rate is normal" is the correct answer for the above question.

Explanation:

  • The above question code is written in the c++ language, in which there is one variable of bool type whose value is true.
  • And this variable is also tested in the if-condition which gives the true and the if-body will be executed.
  • Then the internal if-condition will give the false result because the value of the empsalary is not less than 45000. It is because the above statement "empsalary=45000" will assign the value 45000 on the empsalary variable.
  • Then the else block will be executed which prints "the employee pay rate is normal".

You might be interested in
The parameter passing mechanisn used in C is
Step2247 [10]

Answer:

Hope you understand this answer

7 0
3 years ago
Read 2 more answers
#Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
gulaghasi [49]

Answer:

Here is the function replace_all:

def replace_all(target_string,find_string,replace_string):

   result_string = replace_string.join(target_string.split(find_string))  

   return result_string

#if you want to see the working of this function then you can call this function using the following statements:

target_string = "In case I don't see ya, good afternoon, good evening, and good night!"

find_string = "good"

replace_string = "bad"

print(replace_all(target_string, find_string, replace_string)

Explanation:

The above program has a function called replace_all that accepts three arguments i.e target_string, a string in which to search ,find_string, a string to search for and replace_string, a string to use to replace every instance of the value of find_string. The function has the following statement:

replace_string.join(target_string.split(find_string))  

split() method in the above statement is splits or breaks the target_string in to a list of strings based on find_string. Here find_string is passed to split() method as a parameter which works as a separator. For example above:

target_string = In case I don't see ya, good afternoon, good evening, and good night!

find_string = good

After using target_string.split(find_string) we get:

["In case I don't see ya, ", ' afternoon, ', ' evening, and ', ' night']

Next join() method is used to return a string concatenated with the elements of target_string.split(find_string). Here join takes the list ["In case I don't see ya, ", ' afternoon, ', ' evening, and ', ' night'] as parameter and joins elements of this list by 'bad'.

replace_string = bad

After using replace_string.join(target_string.split(find_string))  we get:

In case I don't see ya, bad afternoon, bad evening, and bad night!  

The program and output is attached as a screenshot.

7 0
3 years ago
A(n) _____ is a type of man-in-the-middle attack where an attacker captures the data that is being transmitted, records it, and
professor190 [17]

Answer:

wireless replay attack

Explanation:

Based on the scenario being described within the question it can be said that the type of attack that is being described is known as a wireless replay attack. Like mentioned in the question this is a network attack where an individual hijacks data in the middle of it being sent in order to copy it before the data reaches the intended recipient. This information can then be used for whatever the attacker intends.

6 0
3 years ago
Read 2 more answers
A trench is a narrow excavation in which the depth is greater than the width and the width does not exceed 15 feet. A. False B.
Arturiano [62]
I think it is false
4 0
3 years ago
Read 2 more answers
When you respond to an email from your bank that asks you to verify your account information, you may become a victim of a _____
goldfiish [28.3K]
You may be a victim of an "Identity" scam. 
3 0
3 years ago
Other questions:
  • The ____ is a new feature in versions of microsoft office, starting with office 2007; it consists of tabs, which contain groups
    5·1 answer
  • Why might a government entity choose to offer some information and services online as in e-government
    8·2 answers
  • Write a Temperature class that will hold a temperature in Fahrenheit, and will provide methods to get and display the temperatur
    5·1 answer
  • A style manual can be described as
    11·2 answers
  • Which option in presentation software can you use to apply a “fly in” effect to the objects on a slide? A)flowchart B)shapes C)
    11·2 answers
  • WHERE WAS THE CHEESEBURGER INVENTED?
    9·1 answer
  • What channel does the news come on? <br><br> i dont have cable i have roku :\
    8·1 answer
  • How many times will line 7 be executed when the following code is run?
    5·1 answer
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
  • a) consider the binary number 11010010. what is the base-4 representation of (11010010)2? (there is a way to do this without con
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!