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
timama [110]
3 years ago
5

Which statement allows you to properly check the char variable code to determine whether it is equal to a "C" and then output "T

his is a check" and then advance to a new line?
(A) If code is equal to Y



cout < < 'This is a check\n":



(B) If (code = "Y")



cout < < 'This is a check" < < endl:



(C) If (code == 'Y')



cout < < 'This is a check\n":



(D) If (code == Y)



cout < < 'This is a check" < < endl:
Engineering
1 answer:
olasank [31]3 years ago
7 0

Answer:

if (code == 'Y')

  cout << "This is a check\n";

Explanation:

I believe you want to check whether it is equal to "Y", because there is no option that checks "C". You may see the correct structure above, none of the option you provided is totally correct.

In order to check the character, we need to use if statement. Also, since "Y" is a character, we need to use ' ' not " ".

To output "This is a check", we need to use cout. The string should be inside " " not ' ' or ' ".

To have a new line, we may use \n. At the end, we need to use ; not :

You might be interested in
Compare a series circuit powered by six 1.5-volt batteries to a series circuit powered by a single 9-volt battery. Make sure the
lana [24]

Answer:

Both series circuits provide a total voltage of 9 volts to the two bulbs connected in series and the voltage will be equally divided among two bulbs and they will have same brightness. Therefore, both circuits will have same characteristics.

Explanation:

We are asked to compare two series circuits having equal number of light bulbs.

1st circuit is powered by 6 batteries each having a voltage of 1.5V

2nd circuit is powered by a single battery having a voltage of 9V.

The six batteries in the 1st circuit can be connected together in series or in parallel.

When the batteries are connected in series (positive terminal of one battery connected to negative terminal of another battery) their voltage gets added which means

Voltage of pack = number of batteries*voltage of each battery

Voltage of pack = 6*1.5

Voltage of pack = 9 volts

But the current remains same in the series connection since there is only path for the current to flow.

On the other hand, when the batteries are connected in parallel, the voltage remains same but the current increases.

Circuit 1:

In this circuit, we have 6 batteries each of 1.5 volts connected in series to provide a voltage of 9 volts.

We have connected 2 bulbs in this series circuit.

The voltage will be equally divided between two bulbs if both bulbs are identical in construction.

So there will be 4.5 volts across each bulb and both bulbs will have same brightness.

Circuit 2:

In this circuit, we have 1 battery which provide a voltage of 9 volts.

We have connected 2 bulbs in this series circuit just like in circuit 1.

The voltage will be equally divided between two bulbs if both bulbs are identical in construction.

So there will be 4.5 volts across each bulb and both bulbs will have same brightness.

Conclusion:

Both series circuits provide a total voltage of 9 volts to the two bulbs connected in series and the voltage will be equally divided among two bulbs and they will have same brightness. Therefore, both circuits will have same characteristics.

3 0
3 years ago
Which of the following is an activity of daily living? jogging cleaning weightlifting all of the above
Mrrafil [7]

Answer:

cleaning

Explanation:

4 0
4 years ago
Q10: Technician A says that nearly all brands of scan tools will pull DTCs from the ABS
Llana [10]

Hey! How are you? My name is Maria, 19 years old. Yesterday broke up with a guy, looking for casual sex.

Write me here and I will give you my phone number - *pofsex.com*

My nickname - Lovely

7 0
4 years ago
Which of the following is NOT a breach of Netiquette?
alexandr402 [8]

Answer:

I need some more point and i do not understand your question

Explanation:

7 0
3 years ago
Energy.
alexandr402 [8]

Answer:

modern vehicles are made to crunch up a little bit so they that absorbe some of the impact instead of you

Explanation:

8 0
3 years ago
Other questions:
  • Technician A says ASE certification is mandatory in all 50 states before performing an automotive repair for pay. Technician B s
    12·1 answer
  • NASA SPACE SHUTTLE QUESTION:
    14·1 answer
  • A strong base (caustic or alkali) is added to oils to test for: b. entrained air a)- alkalinity b)- acidity c)- contamination. d
    11·1 answer
  • Determine the average power, complex power and power factor (including whether it is leading or lagging) for a load circuit whos
    9·2 answers
  • Can you screen record on WOW Presents Plus on iPhone?
    12·1 answer
  • 9. What is a whip check?
    12·1 answer
  • 3Px=y−y2p2<br><br>first order higher dgree​
    11·1 answer
  • What type of plans have to do with earth, soil, excavation, and location<br> of a house on a lot?
    12·1 answer
  • Are the communication skills required for a team leader in a manufacturing plant different from those of a customer service exec
    9·1 answer
  • s) Use Cramer’s rule to solve the system below, and state the condition at which solution exists. ax+by = 1 cx+dy =−1
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!