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

Each of the following programs has errors. Find as many as you can. 65. // Find the error in this program. #include using namesp

ace std; int main() { int num1 = 0, num2 = 10, result; num1++; result = ++(num1 + num2); cout << num1 << " " << num2 << " " << result; return 0; }
Computers and Technology
1 answer:
Serggg [28]3 years ago
7 0

Answer:

There are two error in this program--

  1. In header file inclusion, file is not defined.
  2. In the statement "result = ++(num1 + num2);" , bracket is fixed after the increment operator.

Explanation:

  • For the first error, the user needs to add the file because "#include" is used to add the library for the program which states about the function and symbols used in the program.
  • The second error is because there must be a variable with the increment operator ( increment operator is being used to increase the value of a variable by 1), but there is a small brace fix in between the operator and operands.
You might be interested in
How to write the algorithm to calculate the square of five numbers
ioda

Answer:

1. A = 7 and B = 12 here...

2. A^2 = 49 thus final answer will have 9 at units place and 4 is carried to add later.

3. Given number multiplied by 'B' => 127*12 = 1524

4. A*B => 12*7 = 84

5. 1524+84 = 1608 ..... ( step 3 + step 4 )

6. 1608+4 =1612 .... (4 is carried as stated in step 2)

7. Now, 16129 is the answer... (From step 2 and 6)

Explanation:

Divide the number in two parts with one part containing only the number at unit's place say part 'A', and other part say 'B', containing the remaining number.

Now square the number at unit's place. The square will be one of these; {0,1,4,9,16,25,36,49,64,81}. The unit's place digit in this square is the unit's place digit in actual final answer.Write it in the answer. If the square of digit at unit's place is a two digit no like from 16 to 81 in above set; write only the digit at unit's place from this square in the final answer and carry the remaining digit.

Multiply the actual number to be squared by part 'B'(the remaining part than the number at unit's place as described in step 1 ).

Multiply the parts 'A' and 'B'.

Add results of step 3 with results of step 4.

Add the carried digit from step 2 to the sum in prior step, that is step 5.

Now write this sum before the number we wrote at unit's place of final answer in step 2.

This number we now obtain from step 7, is the square of our number.

6 0
3 years ago
Read 2 more answers
___________ is some danger that can exploit a vulnerability.
andreyandreev [35.5K]

<u>Threat </u>is some danger that can exploit a vulnerability.

<h3>What is Threat?</h3>

Threat  is seen as Anything that can be able to take advantage of a vulnerability, intentionally as well as  accidentally, and take or damage, the  asset of a person.

Note that a threat is that which a person or firm is protect against and Vulnerability is seen as Weaknesses.

Therefore, <u>Threat </u>is some danger that can exploit a vulnerability.

Learn more about vulnerability from

brainly.com/question/25633298

#SPJ1

8 0
2 years ago
Which of these is outside the scope of an art director's responsibility?
Morgarella [4.7K]

Answer: telling the animators that an entire scene must be reworked

Explanation:

4 0
3 years ago
Read 2 more answers
Why does my smoke detector keep beeping even after i change the battery?.
UkoKoshka [18]

Sometimes they just beep for no reason or the batteries are faulty

8 0
2 years ago
Every windows service has the 3 start types what are those service types?
spayn [35]

Answer:

You can stop, pause, start, delay start, or resume each service as appropriate. You can also modify the start mechanism (Manual or Automatic) or specify an account. Windows Services broadly fall into three categories depending on the actions and applications they control: Local Services, Network Services and System.

5 0
2 years ago
Other questions:
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • You press the power button in order to start your computer but hear nothing and see nothing. Name 2 possible reasons for this.
    6·1 answer
  • Documents on the web stored on web servers are known as web _____.
    6·1 answer
  • A network host with an IP address of 192.168.10.200 wants to send a message to a destination computer with an assigned IP addres
    6·1 answer
  • The countryside presents
    11·1 answer
  • Write a program that asks the user to enter the size of a triangle (an integer from 1 to 50). Display the triangle by writing li
    14·1 answer
  • How many pieces can be connected on to a to an SPS​
    11·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • For a business that is properly using a social media information system, the system can
    13·1 answer
  • Which of the following statements are TRUE about formatting images in HTML.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!