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
GREYUIT [131]
3 years ago
12

Is there a syntax error in the following code? bool hourlyWorker = true; if (hourlyWorker) cout << "The employee is an hou

rly worker.\n"; else cout << "The employee is not an hourly worker.\n";
Computers and Technology
1 answer:
Eduardwww [97]3 years ago
6 0

Answer:

No, there is not

Explanation:

The code will print  -> The employee is an hourly worker.

Here is how:

- <em>hourlyWorker</em> is set as true

- Then we check this part of the code -> if (hourlyWorker)

- If this is true, then the code will print "The employee is an hourly worker."

- If not, then the code will print "The employee is not an hourly worker."

Since if (hourlyWorker) is true, it will print "The employee is an hourly worker."

You might be interested in
Given a number count the total number of digits in a number
MrMuchimi

Answer:

round up the log of the number

Explanation:

The ¹⁰log of a number gives you the number of digits if you round it up.

6 0
3 years ago
Which of the following is true regarding the use of instance variable j in class B1?
melisa1 [442]

Answer: A) It is directly accessible only in B1

Explanation: In the given chunk of code, Class B1 is a base class. Class B2 is derived class of class B1. Class B3 is derived class of B2. As you can see class B1 has two members or instance variables i and j. Instance variable cannot be directly accessible by both B2 and B3. If you see this statement of the given code  private int j; the keyword private is used with the variable j. This keyword is called access specifier. Access specifiers specifies how the members of a class can be accessed. These members are attributes and methods of that class. Any member of a class that are declared private cannot be inherited by derived classes of that class.  Additionally these private members cannot be accessed from within any method inside derived class. So j is directly accessible only in B1. You can access a private instance variable from within the same class or can access  it through the methods of class.

6 0
3 years ago
Phil wants to make a dark themed superhero movie. What could be his target demographic
maria [59]

Answer:

d

Explanation:

i think, because it makes the most sense to me.

5 0
3 years ago
Read 2 more answers
In what decade was photography invented? the 1800s the 1820s the 1840s the 1860s
frutty [35]

Answer:

In the year 1820's

It is B

4 0
3 years ago
Consumers affect which goods and services are produced because they _____.
arlik [135]

Answer:

Choice B, "choose which goods and services to buy"

Explanation:

Consumers choose which goods and services to buy. Companies only want to provide goods and services they know will be bought. Therefore, consumers affect which goods and services are produced because they choose which goods and services to buy.

3 0
2 years ago
Other questions:
  • There are several methods of updating information and data on a webserver. We must consider who performs those updates upfront w
    9·2 answers
  • In general terms, a program that is broken into smaller units of code such as methods, is known as a ________
    6·1 answer
  • Which of the following statements about Linux is not​ true? A. Linux works on all the major hardware platforms. B. It plays a ma
    5·1 answer
  • How does kinetic energy affect the stopping distance of a small vehicle compared to a large vehicle?
    14·2 answers
  • Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to
    8·1 answer
  • How do you turn on the Track Changes feature in a word-processing document?
    12·1 answer
  • For what purpose is keylogging software used? a. To automatically translate input to another language as the user enters data b.
    10·1 answer
  • As technology advances, does technology become more of less complex?
    14·1 answer
  • .... . .-.. .-.. --- .-.-.-<br><br><br> TRANSLATE THAT.
    10·1 answer
  • Microsoft recommends when that you create passwords with upper and lowercase letters, numbers, symbols, and use at least _______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!